ColourSkyDome
function · lighting · primitive
- Address
0x6d0f50· 1689 bytes, up to0x6d15e8- Meaning
- Colours the sky dome's vertices from the light table, the glow and the heading
- Confidence
- verified, proof one
- Finding
- lighting/sky#sky-colours
- Test
lighting::lerp_result_to_byte_difftest,lighting::sky_alpha_branch_difftest,lighting::sky_alpha_index_difftest,lighting::sky_angle_accum_difftest,lighting::sky_angle_wrap_difftest,lighting::sky_row_angle_difftest,lighting::sky_row_step_difftest,lighting::sky_scale_init_difftest
Finding: Sky colours in lighting: sky
The table build colours the dome each frame. With g the glow track times table +0x50, G[k] is
band 2 + k moved toward band 3 by g, k = 1 to 4. The apex is band 2 through the HSV scale at 1.0.
Ring k at column c takes band 2 + k varied by w, the dome track at phase heading/2π + 0.25 − c/24
wrapped into [0, 1): w ≥ 0 moves it toward G[k] by (1 − w)·g; w < 0 gives G[k] moved by −w·g
toward G[k] moved toward band 2 by 0.7·g. The rim and one more colour are band 7. The rings take
the screen tint (sky-colour-tracks).
The derivation is in the doc.
Callers 1
- BuildLightTable lighting
Callees 9
- NTempest::CImVector::Set ui
- CopyColor gx
- LerpColor terrain
- CopyColorRgb terrain
- EvalSkyTrack lighting
- LerpChannel lighting
- ScaleColourValue lighting
- 0x6d5180 lighting
- PackColourBytes lighting
Calls and jumps by a bare address, from tables/calls.tsv.