benilla-re systems structs docs

DeviceLightInitialize

function · gx · orchestration

Address
0x591260 · 116 bytes, up to 0x5912d3
Signature
void __thiscall (void *this)
Meaning
Initializes a device light: directional along +z, black ambient, white diffuse, attenuation 0, 0.7, 0.03
Confidence
verified, proof one
Finding
models/lights#fixed-function-lights
Test
models::light_clamp_pack_difftest

Finding: Fixed-function lights in models: lights

Without vertex shaders a record reaches the device as four lights. Slot 0 is the dominant light: a directional light along +0x78 with ambient +0x54, diffuse +0x60 and third colour +0x6c. Slots 1 to 3 take the nearest point lights from the end of the heap backward, so with four the heap root, the farthest, is left out: diffuse from the light's +0x3c, no ambient or third colour, attenuation +0x54 to +0x5c, at +0x18 (view space) or at +0xc minus the caller's origin. Unused slots are disabled. A colour reaches the device as an ARGB word divided by its largest component, alpha included, with that largest value as the light's scale.

The derivation is in the doc.

Callers 5

Callees 0

None by a direct call or jump.

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