BuildCloudNoiseTables
function · lighting · primitive
- Address
0x6d0c90· 115 bytes, up to0x6d0d02- Meaning
- Fills the cloud noise lattice from rand and the fade table
- Confidence
- inferred
- Finding
- lighting/clouds#cloud-noise
- Test
lighting::sky_bump_lut_difftest,lighting::sky_noise_lut_difftest
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
- InitCloudNoise lighting
Callees 1
- _rand crt
Calls and jumps by a bare address, from tables/calls.tsv.