benilla-re systems structs docs

LightFalloff

function · terrain · primitive

Address
0x69e1c0 · 95 bytes, up to 0x69e21e
Signature
float __thiscall (void *this, float distance)
Meaning
Returns 1 below a range's start and falls linearly to 0 at its end
Confidence
verified, proof one
Finding
terrain/lights#point-lights
Test
terrain::wmo_molt_attenuation_difftest

Finding: Point lights in terrain: map lights

0x6a7ac0 adds a map point light to a lighting context, attenuated by distance from the context's point +0x24 raised by 1.1666666. A light whose falloff +0xf0 is 0 is added unchanged. Otherwise the intensity is 1.0 inside +0xe8, 1 − (d − start) × falloff between +0xe8 and +0xec, and the light is dropped from +0xec outward. The added record is a copy of the light's 27 dwords with its direction set from the offset and its colour +0xb8 times the intensity at +0x40. 0x69e1c0 is the radius fall-off of a fog: 1 below +0x10, 1 − (d − +0x10)/(+0x14 − +0x10) up to +0x14, d clamped to [0, +0x14].

The derivation is in the doc.

Callers 1

Callees 0

None by a direct call or jump.

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