Make render graph slots optional for most cases #8109
Merged
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_VIEWon every node and and we'll be able to use the default impl ofNode::input().Solution
view_entity: Option<Entity>to theRenderGraphContextChangelog
view_entitytoRenderGraphContextMigration 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.