Skip to content
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

[Feature] Subgraph node #57

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Looooong
Copy link
Contributor

@Looooong Looooong commented Sep 26, 2022

Behaviour:

  • The subgraph can be processed without affecting the original graph.
  • Both the subgraph and the original graph are processed correctly with their own given parameters.
  • Both graphs' internal states, inputs and outputs are separated from each other.

Solution:

  • The subgraph is cloned using Instantiate.
  • The subgraph's exposed parameters are cloned using Clone.
  • The subgraph's output render textures are cloned using Instantiate.
  • The subgraph's output render textures are named exactly like the original textures. This ensures that output textures can be looked up by name.
  • Every CustomRenderTexture output ports in all nodes are marked as System.NonSerializable. This ensures the the cloned subgraph doesn't hold CustomRenderTexture references of the original graph.
  • Material in ShaderNode and OutputTextureSettings is cloned using Instantiate for the same reason.

@Looooong Looooong marked this pull request as draft September 28, 2022 17:52
@Looooong Looooong marked this pull request as ready for review September 28, 2022 18:28
@Looooong Looooong marked this pull request as draft September 28, 2022 19:54
@Looooong Looooong force-pushed the feature/subgraph-node branch 2 times, most recently from 9f55916 to 1160873 Compare October 7, 2022 18:14
@Looooong Looooong marked this pull request as ready for review October 7, 2022 18:24
@Looooong Looooong marked this pull request as draft November 22, 2022 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant