SetCloudCover
function · lighting · primitive
- Address
0x6d0970· 59 bytes, up to0x6d09aa- Signature
void __thiscall (void *this, float cover)- Meaning
- Stores the cloud threshold trunc((1 − c)·255), or the override's
- Confidence
- verified, proof one
- Finding
- lighting/clouds#cloud-cover
- Test
lighting::sky_ftol_field_setter_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 3
- UpdateCloudTexture lighting
- SetCloudCoverOverride lighting
- InitSky lighting
Callees 1
- __ftol crt
Calls and jumps by a bare address, from tables/calls.tsv.