benilla-re systems structs docs

s_minusOneThirtieth

global · lighting

Address
0x811628 · 4 bytes, up to 0x81162b
Type
const float
Meaning
Holds −1/30
Confidence
verified, proof one
Finding
lighting/daynight#underwater-tint

Finding: Underwater tint in lighting: day-night

Underwater in water or ocean, the table's fog colour, ambient and diffuse are tinted after the fog derive: f = 1 in water, and in ocean, when the whole liquid word is 1, f = 1 + clamp(z, −30, 0)/30 with z the camera eye's height (NaN as −30). Fog colour and ambient have their HSV value scaled by (f + 1)·0.5 and diffuse by f·0.25 + 0.75. The fog colour written here is replaced later the same frame by the fog update.

The derivation is in the doc.