s_cloudLattice
global · lighting
- Address
0xce92d8· 1024 bytes, up to0xce96d7- Type
float[256]- Meaning
- Holds the cloud noise's 256 random lattice values
- 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.