benilla-re systems structs docs

s_cloudOctaveSteps

global · lighting

Address
0x86f3dc · 8 bytes, up to 0x86f3e3
Type
const uint16_t[4]
Meaning
Holds the cloud noise's per-octave steps 16, 32, 64 and 128
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.