Shaders: early depth for pixel programs the console tests before they run (glass drawn over characters; port of fxceless #907) #435

Open
LeonardoS11 wants to merge 1 commit from upstream-pr/435 into main
LeonardoS11 commented 2026-11-27 06:32:50 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by LeonardoS11 on 2026-11-27T06:32:50Z.


A pixel program whose DB_SHADER_CONTROL has DEPTH_BEFORE_SHADER (bit 12,
HLSL [earlydepthstencil]) now declares ForceEarlyDepthStencil, unless it
exports depth, stencil or coverage (bits 0-2 and 8, or an SV_Depth*,
SV_Coverage or SV_StencilRef output). Without it the host tests after the
shader: the title's glass prepass wrote its depth and motion for every pixel
of a window pane, the character standing in front of it too, and a later
pass copied those over the character's (the frosted glass of the prologue's
window drawn over Lucia's hair and shoulder). TRANSLATOR_VERSION bumped so
cached translations are made again.

Port of fxceless/victory #907 by SpaghettiMaster545 (the same idea as
avatarmanz #353 for RADV). Checked on an RTX 3080 Ti, Series S profile,
prologue cell at 190 s: hair and shoulder clean in front of the window, the
glass still frosted behind; frame time unchanged (42.4 ms against 42.7 on an
RTX 5070 Ti, one run each).

Note: this bumps TRANSLATOR_VERSION like our VOP1 PR does; whichever lands second needs the next number.

AI-assisted (Claude in Claude Code). Built from source; no game data.

🤖 Generated with Claude Code

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:5522341233 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/435). Originally posted by [LeonardoS11](https://github.com/LeonardoS11) on 2026-11-27T06:32:50Z. --- A pixel program whose DB_SHADER_CONTROL has DEPTH_BEFORE_SHADER (bit 12, HLSL [earlydepthstencil]) now declares ForceEarlyDepthStencil, unless it exports depth, stencil or coverage (bits 0-2 and 8, or an SV_Depth*, SV_Coverage or SV_StencilRef output). Without it the host tests after the shader: the title's glass prepass wrote its depth and motion for every pixel of a window pane, the character standing in front of it too, and a later pass copied those over the character's (the frosted glass of the prologue's window drawn over Lucia's hair and shoulder). TRANSLATOR_VERSION bumped so cached translations are made again. Port of fxceless/victory #907 by SpaghettiMaster545 (the same idea as avatarmanz #353 for RADV). Checked on an RTX 3080 Ti, Series S profile, prologue cell at 190 s: hair and shoulder clean in front of the window, the glass still frosted behind; frame time unchanged (42.4 ms against 42.7 on an RTX 5070 Ti, one run each). Note: this bumps TRANSLATOR_VERSION like our VOP1 PR does; whichever lands second needs the next number. *AI-assisted (Claude in Claude Code). Built from source; no game data.* 🤖 Generated with [Claude Code](https://claude.com/claude-code)
UwUCammie commented 2026-11-27 06:49:54 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by UwUCammie on 2026-11-27T06:49:54Z.


The AMD port passed the generated pixel-shader regression in the Windows MSVC build under Wine. Microsoft’s DXIL validator from DXC 1.9.2609 accepted the early-depth shader, and the fixture confirmed that the flag stays clear for depth exports. The RADV glass scene still needs a side-by-side visual check. AMD #58

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7211887055 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/435#issuecomment-7211887055). Originally posted by [UwUCammie](https://github.com/UwUCammie) on 2026-11-27T06:49:54Z. --- The AMD port passed the generated pixel-shader regression in the Windows MSVC build under Wine. Microsoft’s DXIL validator from DXC 1.9.2609 accepted the early-depth shader, and the fixture confirmed that the flag stays clear for depth exports. The RADV glass scene still needs a side-by-side visual check. [AMD #58](https://github.com/jtrudeau1530/VIctory-7900XTX/pull/58)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/435:upstream-pr/435'
git switch 'upstream-pr/435'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/435'
git switch 'upstream-pr/435'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/435'
git switch 'upstream-pr/435'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/435'
git switch 'main'
git merge --squash 'upstream-pr/435'
git switch 'main'
git merge --ff-only 'upstream-pr/435'
git switch 'main'
git merge 'upstream-pr/435'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
avatarmanz/VIctory-7900XTX!435
No description provided.