Skip to content

Conversation

robojeb
Copy link
Contributor

@robojeb robojeb commented Jan 27, 2022

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.

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.
@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Jan 27, 2022
@robojeb
Copy link
Contributor Author

robojeb commented Jan 27, 2022

@superdump was involved with the discussion on Discord which resulted in this PR.

@james7132 james7132 added A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior and removed S-Needs-Triage This issue needs to be labelled labels Jan 27, 2022
@superdump
Copy link
Contributor

Just noting that @HackerFoo has also changed this here: #3552

Copy link
Contributor

@superdump superdump left a 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. :)

@robojeb
Copy link
Contributor Author

robojeb commented Jan 27, 2022

Sounds good, I will await further information.

@james7132
Copy link
Member

Just a heads up, #3552 has been merged. Should this be revisited?

@superdump
Copy link
Contributor

store is set to true on main. Closing.

@superdump superdump closed this Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Depth buffer is cleared after MainPass3d before custom rendering nodes

3 participants