benilla-re systems structs docs

s_lodDistance

global · terrain

Address
0x867960 · 4 bytes, up to 0x867963
Type
float
Meaning
Holds lodDist, 77 at start, the depth beyond which a chunk takes the far level
Confidence
verified, proof one
Finding
terrain/cull#chunk-level-and-idle-release

Finding: Chunk level and idle release in terrain: cull

Each frame, for every chunk of a loaded area, 0x6afad0 stores the view depth of the chunk's sphere, (p.y·c.y + p.z·c.z) + p.x·c.x + p.w − r with p the camera's view plane, sets the chunk's level to maxLOD (3), or to 2 when world flag 4 is set and the depth is above lodDist (77), and advances its idle time by the frame time. After 5 seconds it releases the chunk's vertex and index buffers; its detail doodads get 0x6b28e0 after 1 second when 0x6b2900 allows and are freed after 5; and each liquid slot releases its buffers after 5 seconds of its own.

The derivation is in the doc.