-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make render graph slots optional for most cases #8109
Merged
Merged
Conversation
This file contains 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
IceSentry
added
A-Rendering
Drawing game state to the screen
M-Needs-Migration-Guide
A breaking change to Bevy's public API that needs to be noted in a migration guide
C-Feature
A new feature, making something new possible
labels
Mar 16, 2023
IceSentry
force-pushed
the
render-graph-view-entity
branch
from
March 16, 2023 22:16
642b6bd
to
4fa9f82
Compare
Example |
1 similar comment
Example |
IceSentry
force-pushed
the
render-graph-view-entity
branch
from
March 17, 2023 05:21
e278541
to
06567fd
Compare
JMS55
approved these changes
Mar 17, 2023
cart
approved these changes
Mar 21, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice usability win. Very on board for this!
Elabajaba
added a commit
to Elabajaba/bevy
that referenced
this pull request
Mar 22, 2023
Elabajaba
added a commit
to Elabajaba/bevy
that referenced
this pull request
Mar 29, 2023
This was referenced Jun 28, 2023
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-Feature
A new feature, making something new possible
M-Needs-Migration-Guide
A breaking change to Bevy's public API that needs to be noted in a migration guide
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
RenderGraphContext
. This also means we won't need to haveIN_VIEW
on every node and and we'll be able to use the default impl ofNode::input()
.Solution
view_entity: Option<Entity>
to theRenderGraphContext
Changelog
view_entity
toRenderGraphContext
Migration Guide
You can now get the view_entity directly from the
RenderGraphContext
.When implementing the Node:
When adding the node to the graph, you don't need to specify a slot_edge for the view_entity.
Notes
This PR paired with #8007 will help reduce a lot of annoying boilerplate with the render nodes. Depending on which one gets merged first. It will require a bit of clean up work to make both compatible.
I tagged this as a breaking change, because using the old system to get the view_entity will break things because it's not a node input slot anymore.
Notes for reviewers
A lot of the diffs are just removing the slots in every nodes and graph creation. The important part is mostly in the graph_runner/CameraDriverNode.