SetDeviceLight
function · gx · orchestration
- Address
0x589d80· 61 bytes, up to0x589dbc- Signature
void __fastcall (uint32_t index, const void *light, float x, float y, float z, uint32_t enabled)- Meaning
- Sets one of the device's four fixed lights and its enable flag; an index of 4 or more fails
- Confidence
- verified, proof one
- Finding
- models/render#lighting-lanes
Finding: Lighting lanes in models: drawing
A lit material takes one of three lanes. With the vertex shader flag set it packs the lighting
record's harmonic terms into vertex constants c10 to c16, or pixel constants c1 to c7 when a pixel
shader is bound, writes the nearest point lights to c17 to c27, and turns fixed lighting off.
Without it, it commits the record to the device lights (0x71c730(0, 0)) with lighting on. An unlit
material turns lighting off when 0x589ca0 returns nonzero; otherwise it sets light 0 white along
(0, 0, −1) with black ambient, disables lights 1 to 3 and turns lighting on. Only kinds 0 and 2 set
the flag.
The derivation is in the doc.
Callers 5
- 0x5bfa40 unassigned
- WorldTextDrawIcons playername
- M2DrawSetLighting models
- M2LightToDeviceLight models
- M2LightingSetDeviceLights models
Callees 3
Calls and jumps by a bare address, from tables/calls.tsv.