Shaders: a pixel program the console tests depth before (DB_SHADER_CONTROL.DEPTH_BEFORE_SHADER) is declared [earlydepthstencil]: glass no longer lies over what stands in front of it #353
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!353
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-353"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Serph91P on GitHub · 2026-11-26 18:16 UTC · original
Serph91P:shader-early-depth→main· +24 −2 · 4 files · 1 commits · openA character standing in front of a window pane had hair, neck and shirt smeared right of a straight vertical line, the pane's edge; panes seemed to shimmer through whatever was in front of them. One commit on
2de9980.Cause: the glass pre-pass (
PS_AlphaPrepass, d16aa632) also writes the pane's depth and velocity into a storage texture. The console tests depth before the program runs (bit 12 ofDB_SHADER_CONTROL). The translator read the bit and did not pass it on, and D3D12 tests depth after a program that writes storage textures unless it is declared early. So the texture was written for every pixel the pane's mesh covers, behind the head too;PS_AlphaVelocityDepthResolvethen put the pane's depth and velocity into the scene's at those pixels, and the title's TAA smeared them.What this does:
emit/lower.rsgives a pixel program with the bit set and no depth export the DXIL flag for early depth and stencil. In the frame looked at, 333 pixel programs carry the bit, 50 of them can kill pixels.TRANSLATOR_VERSION1 → 2; #354 also goes 1 → 2 on its own, so whichever lands second needs 3.Tested (RX 7900 XTX, RADV Mesa 26.3.1, vkd3d-proton 71cae091, Proton Experimental)
x86_64-pc-windows-msvc(cargo-xwin); the whole archive gives 25,694 that translate and 195 that do not, as before;cargo test -p victory-shader --lib(209 passed),cargo xtask policyandcargo test -p xtaskpass.Not tested: Windows, NVIDIA. No unit test for the flag. To watch: the 50 programs that can kill pixels now test and write depth before they run, as the console does; a problem would show as cut-outs (foliage, hair) hiding what is behind them.
No game data in the commit.
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.