benilla-re systems structs docs

s_doodadFadeRadiusSmall

global · terrain

Address
0x810188 · 4 bytes, up to 0x81018b
Type
float
Meaning
Holds 0.5, the largest radius of the first doodad fade band
Confidence
verified, proof one
Finding
terrain/scene#doodad-def-draw

Finding: Doodad def draw in terrain: scene

0x683f80 draws the doodad defs: each is unlinked, its transform callback +0x174 called and its model's matrix set. With world flag 1 set, d is the horizontal distance of the centre from the camera less the radius r, and r picks the alpha 1 − (d − s)/n, capped at 1.0: s = 40, n = 10 for r ≤ 0.5; s = 100, n = 25 for r ≤ 2.5; s = 150 (the far clip less 50 when that is under 200), n = 50 for r ≤ 7.0; a larger r never fades. Above 0 the model is set animated, visible and lit with the alpha; else it stays as it was.

The derivation is in the doc.