benilla-re systems structs docs

ScaleColourValue

function · lighting · primitive

Address
0x6d1620 · 232 bytes, up to 0x6d1707
Meaning
Scales a colour's HSV value by a factor and returns it with alpha 255
Confidence
verified, proof one
Finding
lighting/daynight#underwater-tint
Test
lighting::dn_color_to_bgra_difftest

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.

Callers 2

Callees 2

Calls and jumps by a bare address, from tables/calls.tsv.