benilla-re systems structs docs

M2DrawSetLighting

function · models · primitive

Address
0x70baf0 · 1674 bytes, up to 0x70c179
Meaning
Sets an element's lighting, lights, fog mode and colour, and its clip plane on the device
Confidence
verified, proof one
Finding
models/render#lighting-and-fog
Test
models::batch_alpha_resolve_difftest, models::batch_clamp_pack_difftest, models::batch_negate4_difftest

Finding: Lighting and fog in models: drawing

Lighting is on unless the material has flag 1 or its blend is 5 or 6. Fog is on unless the material has flag 2 or the lighting record has no fog, and its mode comes from the blend: modes 0 to 2 fog to the record's colour, 3 and 4 to black, 5 to white and 6 to grey 0x808080. The fog range is the record's start +0x184 and end +0x188. An element straddling the clip plane sets it as a user clip plane, negated for list 2.

The derivation is in the doc.

Callers 3

Callees 12

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