Write cloud depth at the first raymarch hit so buildings occlude the clouds - #1750
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 writesgl_FragDepthat 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.aosoftened to radius 1.1, intensity 1.5.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;
SkyDomerenders opaque-first with depth writes off, so it is not affected.Verification:
check-typesshell pass;check-changelog,check-stateful-ratchetpass. Shader change, so evidence is the render.studio-showcase
--mode play, before / after:🤖 Generated with Claude Code