EvalSkyTrack
function · lighting · primitive
- Address
0x6cf6c0· 232 bytes, up to0x6cf7a7- Signature
float __fastcall (const float *keys, uint32_t count, float phase)- Meaning
- Evaluates a key track at a phase of the day, interpolating cyclically
- Confidence
- verified, proof one
- Finding
- lighting/celestial#tracks
- Test
lighting::dn_track_eval_difftest
Finding: Tracks in lighting: sun, moons and stars
A track is a list of keys {time, value}, time a fraction of the day. 0x6cf6c0 clamps the phase to
[0, 1] (NaN as 1), takes the first key i with phase ≤ time[i] and the key j before it, cyclically
(the last key when i is the first or when no key qualifies, i then the first). With d = time[i] −
time[j] it returns value[j] when |d| < 0.001; otherwise it adds 1 to a negative d and to a
negative e = phase − time[j], and returns value[j] + (value[i] − value[j])·e/d at 53 bits, written
as value[j] − (value[j] − value[i])·e/d when value[i] < value[j].
The derivation is in the doc.
Callers 8
- UpdateGlare lighting
- ColourCloudBand lighting
- ColourSkyDome lighting
- UpdateStars lighting
- UpdateSunDirection lighting
- UpdateCelestialBodies lighting
- GetNightFraction lighting
- GetNightFraction2 lighting
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.