benilla-re systems structs docs

GatherSlotLights

function · terrain · primitive

Address
0x68df70 · 589 bytes, up to 0x68e1bc
Signature
void __thiscall (void *this)
Meaning
Builds a liquid slot's lighting record from the light state and the lights of its chunk
Confidence
inferred
Finding
terrain/liquidpass#slot-lights
Test
terrain::light_mid_y_difftest, terrain::doodad_plane_value_difftest, terrain::doodad_gate_difftest, terrain::doodad_color_normalize_difftest

Finding: Slot lights in terrain: liquid passes

0x68df70 builds the lighting a liquid slot is drawn with. It makes a model lighting record at the slot's owning chunk ([slot + 0x1c]): x and y from +0x5c and +0x60, z the middle of the slot's two heights +0x4 and +0x8, radius 23.57 (0x41bc8fb3); sets its fog from the light state's +0x70, +0x74 and +0x78; and, when the record's view depth less twice its radius is below the fog end, adds the global map light and each light of the chunk's list whose +0xdc is set; it finishes the record at the camera.

The derivation is in the doc.

Callers 3

Callees 12

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