BuildCloudCurve
function · lighting · primitive
- Address
0x6d0900· 109 bytes, up to0x6d096c- Signature
void __thiscall (void *this, float gamma)- Meaning
- Builds the cloud cover curve 255 − 255·γ^x from the current threshold
- Confidence
- verified, proof one
- Finding
- lighting/clouds#cloud-cover
- Test
lighting::dn_tone_curve_difftest
Finding: Cloud cover in lighting: clouds
Each texel's cover byte is curve[b − T], or 0 when b < T, with b the low byte of
bits(f32(n·64 + 128 + 512)) >> 14 for the noise value n and T = trunc((1 − C)·255) for the cover
C, scalar band 3 (table +0x58). The curve is built once at start-up from T = 102:
curve[i] = trunc(255 − 255·0.96^(i·d)), d = (255 − 102)/256 accumulated as a float.
The derivation is in the doc.
Callers 1
- InitSky lighting
Callees 2
Calls and jumps by a bare address, from tables/calls.tsv.