Single-Color Sky Model β Implementation Checklist #
Goal: reuse the physically-based scattering model (Rayleigh + Mie + ozone)
but collapse the output down to one RGB value representing the dominant
sky color, instead of a full gradient texture.
Phasing note: this checklist is split into a Baseline (single
scattering only β get a working, correct-looking sky first) and a Later
phase (multiple scattering β added once the baseline is solid). Multiple
scattering is the most complex and error-prone piece of this whole model,
so it's deliberately pushed to the end rather than blocking your first
working version.
0. Decision to lock in first: what does "dominant color" mean? #
This determines your sampling strategy in Phase 4, so pick one before writing code.
Recommendation: start with Option A for a working baseline, then upgrade
to Option B (5β8 samples, luminance-weighted) once the pipeline works β
it's a small code change and noticeably more robust across sun angles.
Aside: pollution-aware Mie scattering via Open-Meteo #
Open-Meteo's Air Quality API can supply real PM2.5/PM10 to drive the Mie
coefficient instead of a fixed haze constant, per the MEE approach discussed
earlier. This is independent of the multiple-scattering work above and can
be done at any point.