fix(WebGPU): pass depth-equal fragments in the translucent pass#3548
Open
sedghi wants to merge 1 commit into
Open
fix(WebGPU): pass depth-equal fragments in the translucent pass#3548sedghi wants to merge 1 commit into
sedghi wants to merge 1 commit into
Conversation
The order-independent translucent pass depth-tested with 'greater' (reversed z), rejecting translucent fragments exactly coplanar with already-rendered opaque geometry — e.g. a labelmap or fusion overlay on an image slice, which silently disappeared. Use 'greater-equal', matching the OpenGL backend where equal depths pass in the translucent pass. Adds a WebGPU regression test (coplanar translucent overlay over an opaque slice).
6 tasks
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.
Context
The order-independent translucent pass depth-tests with
depthCompare: 'greater'(reversed z) against the opaque pass depth buffer, so translucent fragments that are exactly coplanar with already-rendered opaque geometry are rejected and silently disappear. The common case is a translucent overlay on an image slice — e.g. a segmentation labelmap or fusion layer — which renders on the OpenGL backend (equal depths pass in its translucent pass) but not on WebGPU.Found while running Cornerstone3D segmentation overlays on the WebGPU view API. Related: #3547 (independent fixes from the same effort).
Results
greater-equalstill rejects strictly farther fragments).Changes
WebGPU/OrderIndependentTranslucentPass:depthCompare: 'greater'→'greater-equal'.PR and Code Checklist
npm run reformatto have correctly formatted codeTesting
Fails without the fix (
expected 0 to be greater than 60), passes with it. Requires the WebGPU adapter flags for headless Chromium added in #3547'svitest.config.jschange when running before that lands.