benilla-re systems structs docs

M2LightingTransformToView

function · models · primitive

Address
0x71c160 · 387 bytes, up to 0x71c2e2
Signature
void __thiscall (M2Lighting *this)
Meaning
Transforms a lighting record's nearest point lights and its clip plane into view space, once
Confidence
verified, proof one
Finding
models/lights#view-space-lights
Test
models::m2_light_coord_finalize_difftest

Finding: View-space lights in models: lights

Once per record (flag 1), and only with a scene, each nearest point light's position +0xc goes through the view +0x9c into the light's +0x18. A clip plane (n, w) becomes view-space: the point −w·n goes through the view, n through its 3×3 part and is normalized unless shorter than 2.384186e-7, and w becomes −(n′·p′).

The derivation is in the doc.

Callers 1

Callees 1

Calls and jumps by a bare address, from tables/calls.tsv.