s_globalLightDirection
global · terrain
- Address
0xca816c· 12 bytes, up to0xca8177- Type
float[3]- Meaning
- Holds the direction of the global map light entities and doodads are lit from
- Confidence
- verified, proof one
- Finding
- terrain/lights#entity-lighting
Finding: Entity lighting in terrain: map lights
0x6a7300 adds an entity's light to a model's lighting record (the stack argument). With +0xc
bit 4 (lit by the sun) it adds the scene light block's directional colour times the intensity
+0xa4, with the block's direction. Otherwise the colour is the entity's +0xa0 bytes, as byte /
255, times +0xa4, and the direction the global one 0xca816c, or with +0x90 bit 0x800 the
global direction plus (sun direction − global) × (+0xa3 / 255), normalized. It also adds the
ambient +0x9c and each point light of the entity's list, and sets the interior fog on the record
when the camera's fog claim is the entity's map object.
The derivation is in the doc.