-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Prevent WGPU from re-initializing depth buffer #3777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
If a render pass is added after the "main_transparent_pass_3d" then WGPU will decide to re-initialize the depth buffer. This prevents subsequent render passes from rendering properly.
@superdump was involved with the discussion on Discord which resulted in this PR. |
Co-authored-by: Robert Swain <[email protected]>
Just noting that @HackerFoo has also changed this here: #3552 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this now looks good, I'd just like to see what happens with #3552 when the merge train opens up as I expect a bunch of those PRs to go through. This commentary is very useful context though so we'll probably want it anyway. That said, this PR will probably be easier to rebase. :)
Sounds good, I will await further information. |
Just a heads up, #3552 has been merged. Should this be revisited? |
|
If a render pass is added after the "main_transparent_pass_3d" then WGPU will decide to re-initialize the depth buffer.
This prevents subsequent render passes from rendering properly.
Objective
Fixes #3776
Solution
Unconditionally setting
store: true
will prevent WGPU from deciding that the Depth buffer is invalid if there is a subsequent render stage.This is slightly sub-optimal for performance in the base case, but makes behavior more expected when customizing the render graph.