Batch prepasses that use depth only#22813
Open
tychedelia wants to merge 9 commits intobevyengine:mainfrom
Open
Batch prepasses that use depth only#22813tychedelia wants to merge 9 commits intobevyengine:mainfrom
tychedelia wants to merge 9 commits intobevyengine:mainfrom
Conversation
atlv24
reviewed
Feb 5, 2026
atlv24
reviewed
Feb 5, 2026
IceSentry
reviewed
Feb 5, 2026
| pub type DrawDepthOnlyPrepass = ( | ||
| SetItemPipeline, | ||
| SetPrepassViewBindGroup<0>, | ||
| SetPrepassViewEmptyBindGroup<1>, |
Contributor
There was a problem hiding this comment.
I wonder if we could have a more generalized SetEmptyBindGroup, render command. I also needed pretty much the same thing recently.
IceSentry
approved these changes
Feb 5, 2026
Contributor
IceSentry
left a comment
There was a problem hiding this comment.
LGTM
I started an example run just to be sure it didn't break anything bevyengine/bevy-example-runner#206
atlv24
reviewed
Feb 5, 2026
Member
Author
|
The example run looks good so this one should be good to go |
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.
For prepasses that don't need to access material data or write normals/motion vectors, we can batch them together. To do so, we store a new draw command that binds an empty bind group in place of the material bindings and add
Nonefor the material id to the batch set key.Testing:
main:

this:
