benilla-re systems structs docs

InitCloudNoise

function · lighting · orchestration

Address
0x6d0c00 · 137 bytes, up to 0x6d0c88
Meaning
Sets the cloud noise's four octaves
Confidence
inferred
Finding
lighting/clouds#cloud-noise

Finding: Cloud noise in lighting: clouds

The noise value n is four octaves of value noise, each half the amplitude of the one before: lattice values from a table of 256 random floats 1 − 2·rand/32767 filled at start-up, a 256-entry permutation, and a fade table 0.5·(1 − cos(i·π/256)) for the interpolation weights, stepped in 16-bit fixed point by a per-octave step from 0x86f3dc and advanced by the noise phase. The third octave's partial sum also gives each texel a surface slope, its difference to the previous texel and the previous row times 2^(shift − 7).

The derivation is in the doc.

Callers 1

Callees 1

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