Cold Start
README.md
asc_clouds — ASCENSION: the volumetric cumulus deck
Controls the cloud layer the camera climbs through and then glides out over: the density field, its self-shadowed lighting, and the sunset palette it is lit with.
Owns
CLOUD_WGSL— the fill compute shader that bakes a 144×40×144 rgba16f volume: cumulus profile (flat base, noise-eroded billowy tops), a wind offset, the ragged sun-side clearing, and two density taps toward the sun for self-shadowing.- The fill-uniform contract. Both sides live in this file — the WGSL that
reads
U[0..15]and the Lua that packs it — so the mapping can never drift between two places. - The palette:
duskMix, thelit/SHADOW_COLOR/NIGHT_LITcolours, and the ±8 %Music.level()brightness pulse. - The raymarch parameters passed to
Vol.frame(AABB, step size, gains). - The
"asc"volume key, and therefore the whole spawn / fill / frame / destroy lifecycle.
Reads from the orchestrator
| argument | from | use |
|---|---|---|
sun.elev | asc_sky | duskMix — the golden → rose shift |
sun.nightMix | asc_sky | night blend + emission falloff |
sun.dir | asc_sky | fill uniform U[1..3], the lighting direction |
cam.pos / cam.rot / cam.fov | asc_shots | the raymarch's inverse view-projection |
The camera dependency is why this aspect runs after asc_shots every frame.
Boundaries
preseed.volumeregisters the texture, both uniform buffers and the fill shader under the single key"asc". Exactly one module may own that key — this one.Vol.fillre-bakes all 829 440 voxels every frame (36×10×36 workgroups). It is the dominant GPU cost of the part.- The volume grid is stretched over an 840×34×520 world AABB, so voxels are ≈5.8 × 0.85 × 3.6 units — very anisotropic and coarse in XZ.