Repository navigation
feat(gpu): VICTORY_RAY_SKIP=shadow leaves out local-light shadow rays while the BVH builder is held back - #660
Merged
Conversation
… while the BVH builder is held back Traced against structures nothing built, CS_RaytraceShadows_Mixed and CS_TraceShadowRays_* mark whole light tiles lit for a frame now and then: the cell flashed white in radial rays and tiles 6.5-9.7 times per 100 frames on an M1 Max, 1.6 with them left out, and the ceiling lights stay. Co-Authored-By: Claude Opus 5.5 <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.
Summary
VICTORY_RAY_SKIP=shadow(off by default) leaves out the local lights' shadow-ray dispatches (CS_RaytraceShadows_Mixed,CS_TraceShadowRays_*) in frames where the BVH builder is held back, like the existingresolveandactivateparts.Since #591 holds the builder back, those programs trace against structures nothing built. Every so often they mark whole light tiles fully lit for one frame. In the cell this shows as white radial rays and tile-shaped blocks, then a bleached frame or two.
How it was found (M1 Max, 32 GB, macOS 15.7.3, D3DMetal 4.0b3)
7-minute recordings in the world, turning and walking, scored for brightness jumps (more than 25 over the median of the previous 10 frames):
VICTORY_GPU_TIMING=1(every list alone)VICTORY_LITERAL_HALVES=0VICTORY_SKIP_PIPELINES= the light loopVICTORY_SKIP_PIPELINES= the two shadow-ray programsVICTORY_RAY_SKIP=1,shadow, normal buildWith
1,shadowthe median world frame was 538 ms against 822 ms withoutVICTORY_RAY_SKIP, mostly because about 660CS_RaytracingResolvedispatches a frame are left out.Change
ray_skip.rs: a third part,SHADOW, named byCS_RaytraceShadows_MixedandCS_TraceShadowRays.1/on/allkeep their meaning (resolves and activation);shadowis opt-in and combines with commas.CS_RTDistantShadowTrace*is not; the lines name it.Local lights cast no ray-traced shadows with it on.
🤖 Generated with Claude Code