751 words
Status: accepted · 28 Nov 2026. Builds on ADR-0076 and ADR-0077.
Context
No cloud shadowed anything the scene draws. Shadows are what the ground most
lacks under a fair-weather sky, and the port already answers the sun's
transmittance at any world point through its cascades (cloudShadowAt).
Three things stood between that function and our materials. The ground, the sea and the sphere are the page's, and the port is a chunk a page may never load, so no material may import it. The port's function is built over one pass's descriptor and uniforms, and since ADR-0077 a served body of another air disposes the pass and builds the next: a material built over a rig's nodes would hold a disposed pass. And the cascades are fitted to the view's first 200 km, but the port's last cascade has no far edge, and under a high sun its atlas lies on the ground below the eye. From 600 km and 1,200 km up over G1, the first attempt drew a rectangle of shadow with hard edges in the middle of the disk.
Decision
The direct beam of the ground, the sea and the sphere takes one
cloudSunlight term, which reads a page-owned copy of the port's shadow,
faded out over the last quarter of its reach.
- One term, where the beam is formed. Each of the three materials forms
its direct beam once,
dayColor · sunThrough(…), and multiplies it bycloudSunlight(position), so a shadow is the same term on both sides of the descent gate (rule 59). Skylight is untouched, so a shadow keeps its sky's blue. The sphere is the body scaled about the eye by its compression, and hands the shadow its point unscaled. - Asked for by name.
cloudSunlightbuilds whatever the renderer's context offers asgetCloudSunlight, and 1 where it offers nothing. The canvas installs the clouds' provider on each WebGPU renderer it builds, before R3F mounts a child, so no program is built without it. A renderer without the clouds builds no cloud into any material. - Built once a page, over nodes of the page's own.
cloudsShadow.tsbuilds the port'screateCloudShadowNodeover its own uniforms and an atlas stand-in with the real atlas's sampling contract. The chain on screen has the port prepare the frame's atlas (prepareShadow) and copies its rig's atlas, cascades and frame into them inbeforeScene, which the sensor calls after the upscaler jitters the projection and before the scene pass: prepared before the jitter, the port found another projection at its march and rendered the atlas twice a frame under temporal reconstruction. A rig whose tables are still baking casts nothing. A chain that stops drawing releases them only if it is the one followed, so a handover cannot blank the ground under its successor, and no program is left holding a disposed atlas. - Faded past the reach. The transmittance turns back to 1 between 150 and 200 km from the eye. Nothing beyond the cascades' reach casts, and a descent fades the shadows in.
Alternatives considered
Building materials over a rig's own cloudShadowAt. Every swap of air
would rebuild every terrain, sea and sphere program, and a material compiled
in the gap between rigs would hold a disposed pass.
The port's aerial perspective, which takes the shadow on the ground itself. It is the port's air over the whole scene, and our ground draws its own air (ADR-0056). Two airs over one surface is the double lighting the port's own contract warns against.
Raising shadow.maxFar with the eye's height. The cascades would reach
the whole view from orbit, at texels a few kilometers wide, and the price
(9.10 against 19.82 ms at high, ADR-0076's spike) was paid for 200 km. From
orbit experimental.distantCloudShadows is the candidate, and it belongs with
the orbit's own work.
Consequences
At G1, at 1920 × 1080 on the dev build, the frame goes from 14.46 to 15.18 ms,
the least of three ir.gpu(135) reads: the port already prepared its atlas
every frame for its own march, so this is the receivers' eight PCF taps a
fragment. Above 200 km nothing casts a shadow, and the descent gate on G1's
world (between 1,200 and 2,500 km) has none on either side. The far cascade's
texels are hundreds of meters wide, so from 100 km up a cumulus's shadow is a
blot several times the cloud. The hull and the flare take no shadow yet.