Create a Sub Graph
To perform the same operations multiple times within a single shader graph or across multiple shader graphs, create a Sub Graph.
Create a Sub Graph from existing nodes
To create a Sub Graph from an existing set of shader graph nodes, follow these steps:
- In the Shader Graph window, select the nodes you want to include in the Sub Graph.
- Right-click on one of the selected nodes to open the context menu.
- Select Convert To Sub-graph.
Unity creates a Shader Graph asset in the Project window. To edit the Sub Graph, double-click the asset.
Note: If a node in a Sub Graph specifies a shader stage, the Sub Graph can only include nodes that work with or specify the same shader stage.
Create an empty Sub Graph
To create an empty Sub Graph, in the Project window, right-click and select Create > Shader > Sub Graph.