Skip to content

Write cloud depth at the first raymarch hit so buildings occlude the clouds - #1750

Merged
Noisemaker111 merged 1 commit into
mainfrom
claude/cloud-depth
Sep 5, 2026
Merged

Noisemaker111 merged 1 commit into
mainfrom
claude/cloud-depth

Conversation

@Noisemaker111

Copy link
Copy Markdown
Owner

The volumetric cloud proxy dome was depth-tested at its own radius (240), so any building farther than that had the cloud layer painted across it as a flat band. Root cause: the raymarch proxy carried no depth of its own; a permissive default in the shell renderer, not game data.

  • packages/shell/src/environment/VolumetricClouds.tsx: each fragment writes gl_FragDepth at the first cloud sample along its ray (projection and view matrices passed as uniforms), so scene geometry between the camera and the slab occludes the clouds.
  • packages/core/src/render/postProcessing.ts: STUDIO_STAGE_POST.ao softened to radius 1.1, intensity 1.5.
  • CHANGELOG Fixed.

Refs #1353 (clouds and AO items). The inert health HUD and the pale tree are game-side and stay open. No other shell proxy volume tests depth this way; SkyDome renders opaque-first with depth writes off, so it is not affected.

Verification: check-types shell pass; check-changelog, check-stateful-ratchet pass. Shader change, so evidence is the render.

studio-showcase --mode play, before / after:

cloud-depth-before
cloud-depth-after

🤖 Generated with Claude Code

…clouds

The volumetric cloud proxy dome tested depth at its own radius, so anything
farther than 240 units had clouds painted over it. Each fragment now writes
gl_FragDepth at the first cloud sample along its ray. Studio stage AO softened
so tower silhouettes stop streaking.

Refs #1353

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Noisemaker111
Noisemaker111 enabled auto-merge (squash) September 5, 2026 09:13
@Noisemaker111
Noisemaker111 merged commit 96b0e37 into main Sep 5, 2026
6 checks passed
@Noisemaker111
Noisemaker111 deleted the claude/cloud-depth branch September 5, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant