Builtin Library
- ..
- .metadata17 B
- README.md1.2 KB
- properties.yaml1.1 KB
- shader.wgsl6.7 KB
README.md
procedural_sky
The editable atmospheric sky: a day/night gradient with a sun disc and glow, a procedural star field, and a moon opposite the sun, authored entirely from material properties — no texture backs it.
Day, night and the dawn/dusk blend all derive from the directional
light's elevation, so the sky follows whatever drives the scene's sun;
there is no time-of-day uniform. The gradient's zenith, horizon and
ground colours, the sun's size and intensity, the stars, the moon,
turbidity and exposure come from properties.yaml.
The star field holds still unless stars_twinkle is above 0, which
compiles in the SKY_TWINKLE program: each star's brightness then swings
by that amount on the frame clock. A twinkling sky changes the picture on
every frame the clock runs, so a renderer that draws only what changes
keeps drawing under it; a still one leaves an idle screen idle.
Output is radiance scaled by exposure — the scene's own tone-mapping
does the range compression, the same contract as every sky-domain
shader.
The ProceduralSky component owns the runtime material over this shader
(__procedural_sky) and pushes its fields here; sky.get() reports the
resulting configuration.