benilla-re systems structs docs

LerpClamped

function · lighting · primitive

Address
0x674ba0 · 78 bytes, up to 0x674bed
Signature
float __stdcall (float from, float to, float t)
Meaning
Interpolates from a to b with t clamped to [0, 1]
Confidence
verified, proof one
Finding
lighting/weather#weather-ramps
Test
lighting::weather_clamped_lerp_difftest

Finding: Weather ramps in lighting: weather

Each ramp is a clamped linear move over a time that scales with the distance: g = from + (to − from)·clamp(s/(|to − from + 0.001|·10), 0, 1), s the seconds since the ramp started, so a full move takes about 10 s. The effects receive x = max((g − 0.25)·4/3, 0), so no precipitation falls below a grade of 0.25. The density ramps the same way with the span |(to − from)·4 + 0.001|, so its 0.25 range also takes about 10 s; it goes to the light state's weather density and rebuilds the light table.

The derivation is in the doc.

Callers 4

Callees 0

None by a direct call or jump.

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