benilla-re systems structs docs

GetDriftDisplacement

function · terrain · primitive

Address
0x68e4f0 · 172 bytes, up to 0x68e59b
Signature
void __thiscall (void *this, float *out, float dt)
Meaning
Writes the frame's drift displacement: the gust's half-sine in modes 0 and 1, a sink in mode 2, zero otherwise
Confidence
verified, proof one
Finding
terrain/waterfx#drift-gust
Test
terrain::weather_gust_velocity_difftest, terrain::weather_toroidal_advect_difftest

Finding: Drift gust in terrain: water effects

The cloud holds one gust: a unit direction, a time, a rate and an amplitude. 0x68e1c0 rolls a new one from the client random stream: two angles a and b, each ±(2 − f)·π with f in [1, 2) the mantissa-filled draw and the sign from the draw's top bit; the direction is (sin a·cos b, sin a·sin b, |cos a|·0.25) normalized; the time is 0; the rate is a fresh f × 0.0125 and the amplitude a fresh f × 0.005. 0x68e4f0 gives the frame's displacement from the gust.

The derivation is in the doc.

Callers 1

Callees 1

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