tid_cloud_fill.computeShader
- .metadata17 B
- README.md1.9 KB
- bindings.yaml360 B
- shader.wgsl19.6 KB
README.md
tid_cloud_fill
Bakes the TIDES squall into the part's 3D density+colour volume, one voxel per invocation, every frame.
The field is authored at real scale: the volume spans roughly 9.6 km across
and reaches from 350 m to 4500 m, so cloudBase and cloudTop in metres from
preseed.tides.state mean what they say and the deck is genuinely far away
rather than a low dome pretending to be sky.
Four things are layered into it:
- A squall line. A front advances along the wind axis. Ahead of it, thin
scattered fair-weather cumulus at the high base; behind it, full coverage and
towering congestus. At
t = 0the front is astern with open sky toward the sun; byt ≈ 24it has swept past the whole visible box. - The shelf. A hard-edged low band riding just above the cloud base behind
the front. This is what takes the sun at
t = 25and what reads as "a black shelf" in the last beat. - The slot. A narrow ragged wedge carved toward the sun's bearing, low in
the sky and far out, opened only for bar 22 (
t26.25–27.5). It is what lets one hard shaft back through. - The rain veil. Below the base, the shelf density in the same column is
dragged downward as virga, scaled by
rain01. Real volumetric medium, so it hangs where the cloud actually is instead of being a screen-space wash.
Lighting is three density taps toward the sun — 260 m, 700 m and 1500 m — giving
transmittance exp(-occ), which is what produces the lit-rim / dark-core read
that makes cumulus look like cumulus. Colours come from State.palette(t)
(cloudLit / cloudShadow); the sun direction is read live from the scene so
the clouds, the shadows and the glitter track cannot disagree.
Bindings are generated from bindings.yaml. The uniform run is 48 f32
(192 bytes) packed by preseed.tides.sky; the layout is documented at the top
of shader.wgsl and both sides must be edited together.