smog_sky.shader
- .metadata17 B
- README.md1.9 KB
- properties.yaml4.6 KB
- shader.wgsl13.9 KB
README.md
art.smog_sky
Sky-domain shader for Smog's Whitechapel night, 1888. A low, heavy green-grey smog deck drifts slowly overhead: two cloud shells (a heavy lower deck of domain-warped billows and a thin, wind-streaked upper veil) projected onto a curved shell, so they close up into a murky band toward the horizon.
Lighting:
- Moon from
in.sun_direction(the scene's directional light IS the moon). Moonlight diffuses through the deck brightest in the moon's quarter, thin cloud near the moon forward-scatters it into a silver lining, dense cores stay dark, and a one-step self-shadow toward the moon gives the lumps relief. The disc is small and crisp with faint maria, veiled by passing cloud (cloud opacity occludes it), with a corona that brightens where thin cloud covers it, a faint 22-degree ring and a cleared patch around it (moon_clearing). - City gaslight: a dirty amber glow reflected off the cloud undersides, patchy in azimuth and strongest at the horizon, so the street-level horizon is the brightest band and the zenith fades to near-black blue-green.
- A few faint, wide stars, only in gaps high up.
Below the horizon it continues as smoggy green-grey (ground_*) with no
seam at y = 0. Every colour is a hue paired with an *_intensity in linear
radiance; the output is linear HDR before the camera's exposure and ACES.
black_level is a flat pedestal added last that offsets the district
grade's contrast, which otherwise crushes the darkest ~0.035 of sky light to
black. Leave it at 0 under an untouched post chain. A triangular hash dither
(dither) keeps the gradients from banding. Animation runs on in.time
(wind_speed, wind_dir), so the sky stands still in edit mode.
Used by art.smog_sky (material) through a Skybox component:
entity.spawn("Sky").component.add("Skybox", { material = "art.smog_sky" }).