Implement occlusion culling for the deferred rendering pipeline.#17934
Merged
superdump merged 2 commits intobevyengine:mainfrom Feb 20, 2025
Merged
Implement occlusion culling for the deferred rendering pipeline.#17934superdump merged 2 commits intobevyengine:mainfrom
superdump merged 2 commits intobevyengine:mainfrom
Conversation
Deferred rendering currently doesn't support occlusion culling. This PR implements it in a straightforward way, mirroring what we already do for the non-deferred pipeline. On the rend3 sci-fi base test scene, this resulted in roughly a 2× speedup when applied on top of my other patches. For that scene, it was useful to add another option, `--add-light`, which forces the addition of a shadow-casting light, to the scene viewer, which I included in this patch.
superdump
reviewed
Feb 20, 2025
| .as_ref() | ||
| .map(|deferred_texture| { | ||
| if is_late { | ||
| deferred_texture.get_attachment() |
Contributor
There was a problem hiding this comment.
Should the same WebGL2, WebGPU, etc cfg guard be here too? Or practically it doesn’t matter because it won’t be set there?
superdump
approved these changes
Feb 20, 2025
Contributor
superdump
left a comment
There was a problem hiding this comment.
Assuming there is no missing cfg check, LGTM. This was much easier to review hiding white space changes. :)
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.
Deferred rendering currently doesn't support occlusion culling. This PR implements it in a straightforward way, mirroring what we already do for the non-deferred pipeline.
On the rend3 sci-fi base test scene, this resulted in roughly a 2× speedup when applied on top of my other patches. For that scene, it was useful to add another option,
--add-light, which forces the addition of a shadow-casting light, to the scene viewer, which I included in this patch.