benilla-re systems structs docs

LightingAddLight

function · models · primitive

Address
0x71bf90 · 372 bytes, up to 0x71c103
Meaning
Adds a light to a lighting record: a point light into the four nearest, others into the sums
Confidence
verified, proof one
Finding
models/lights#scene-light-grid
Test
models::m2_light_aggregate_dist_difftest

Finding: Scene light grid in models: lights

An enabled point light links into one of the scene's 64×64 grid cells, floor(x·s) & 63 by floor(y·s) & 63 with the scene scale s; any other light links into the scene's global list. The grid is allocated on the first point light. Adding a point's lights to a record takes every global light and every light of the cells its radius covers, and disables a grid light whose frame stamp is stale instead of adding it.

The derivation is in the doc.

Callers 8

Callees 3

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