benilla-re systems structs docs

LerpFogRecord

function · terrain · primitive

Address
0x69efd0 · 227 bytes, up to 0x69f0b2
Signature
void __thiscall (void *this, const void *b, float t)
Meaning
Blends two records of two floats and a packed colour, keeping the alpha
Confidence
verified, proof one
Finding
terrain/lights#fog-record-blend
Test
terrain::lerp_color_rec_difftest

Finding: Fog record blend in terrain: map lights

The candidates are the four fog indices of the first group of the camera set only. An index counts when it is nonzero, its MFOG record lies nearer to the camera, in the model's space, than the record's large radius (+0x14, strictly) and the record's flag 1 is clear; the distance and index enter a max-heap, which pops the farthest first. Each pop moves both sub-records of the output toward the popped record's, by lerp for end and start fraction and by the byte blend for colour, with weight 1 inside the small radius (+0x10) and falling to 0 at the large one. The nearest, popped last, also copies its flags. With no candidate the output stays MFOG[0].

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.