-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Bevy version
Bevy v0.6
Operating system & version
Manjaro
What you did
I implemented a custom Node
with a "node edge" from the "MainPass3d" node to itself (so it always renders after.
The RenderPass for this node bound the Depth buffer from the view entity.
What you expected to happen
I expected the depth buffer to contain depth information from the previous render pass.
What actually happened
WGPU cleared the depth buffer prior to running the new Node's render pass.
Additional information
This was discussed at length on the Bevy discord #rendering channel.
It appears that because the "main_transparent_pass_3d" sets store: false
for the Depth buffer operations that if another render pass attempts to use the depth texture WGPU will consider the buffer invalid and re-initialize it.
the value store:false
was set on recommendation of a rendering linter to reduce bandwidth of writing to the depth buffer when not needed.
This is true in the default case (when "main_transparent_pass_3d" is the last Render pass to be processed) but if a user tries to add a custom render pass after it breaks the expected behavior.