s_fogCandidateHeap
global · terrain
- Address
0xca7c20· 32 bytes, up to0xca7c3f- Type
uint8_t[32]- Meaning
- Holds the max-heap of fog record candidates: data at +0xc, entry count plus one at +0x1c
- Confidence
- verified, proof one
- Finding
- terrain/lights#fog-record-blend
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.