UpdateGlare
function · lighting · primitive
- Address
0x6cf490· 551 bytes, up to0x6cf6b6- Signature
void __thiscall (void *this, float dt)- Meaning
- Moves a glare's envelope, scale and alpha toward its targets for the frame
- Confidence
- verified, proof one
- Finding
- lighting/celestial#glare-update
- Test
lighting::sky_band_scale_difftest,lighting::sky_clamp_difftest,lighting::sky_dir_normalize_difftest,lighting::sky_exposure_pre_difftest,lighting::sky_factor_mul_difftest,lighting::sky_light_dot_difftest
Finding: Glare update in lighting: sun, moons and stars
Each frame 0x6cf490 sets a glare's target to the product of its cloud and submersion
occlusion, 1 − the largest active skybox weight, its visibility track at the time of day and, when
that is nonzero, its draw occlusion. The envelope +0x30 moves toward the target by at most rise
or fall times the frame time. With c = camera forward · the unit direction to the glare, raised to
the look threshold, and f = (c − threshold)/(1 − threshold), the scale +0x24 is lerp(scale ends,
f) times the base scale, the alpha byte becomes bits(f32(old/255 · lerp(alpha ends, f) · envelope ·
255 + 512)) >> 14, and the look factor +0xa4 is c^10 · envelope.
The derivation is in the doc.
Callers 1
- DrawGlares lighting
Callees 2
- EvalSkyTrack lighting
- __CIpow crt
Calls and jumps by a bare address, from tables/calls.tsv.