TrackedRenderPass driven RenderPhases#7080
Closed
kurtkuehnert wants to merge 3 commits intobevyengine:mainfrom
Closed
TrackedRenderPass driven RenderPhases#7080kurtkuehnert wants to merge 3 commits intobevyengine:mainfrom
kurtkuehnert wants to merge 3 commits intobevyengine:mainfrom
Conversation
render phases are now executed using the `TrackedRenderPass::render_phase` method
26234c8 to
0ee2d18
Compare
3 tasks
Contributor
Author
|
Please take a look at #7227 instead. |
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.
Objective
The current code for creating render passes and executing render phases is quite boilerplate-heavy and repetitive.
I have experimented with further improving the API, based on the proposal by @cart (posted in #7043 (comment)):
Solution
This PR comprises two changes:
1. The
RenderPhases are now executed directly using theTrackedRenderPass, with the API described above.TrackedRenderPassis associated with aview_entity.view_entitys in the render method ofDrawfunctions. Instead, they can be accessed directly from theTrackedRenderPassif they are needed.2. I have added a
TrackedRenderPass::create_for_cameramethod, that sets up the render pass based on the camera view and depth target.I think that 1. is a good idea because from what I have gathered a
TrackedRenderPassis always associated with aview_entityanyway.IMO, 2. is less ideal and I am interested if you have got a better idea. There are just too many different components at play that might or might not be required. I still believe that setting up the render attachments in a way that is simpler and more clear is a worthwhile goal though.
Changelog
Todo
Migration Guide
Todo