study/first_study/Library/PackageCache/com.unity.shadergraph@3686fafd4720/Documentation~/Sub-graphs.md

20 lines
1.6 KiB
Markdown
Raw Normal View History

# Sub Graphs
A Sub Graph is a type of shader graph that you include in other shader graphs. Use a Sub Graph to perform the same operations multiple times within a single shader graph, or across multiple shader graphs. It's similar to a reusable function in programming.
| Topic | Description |
|-|-|
| [Introduction to Sub Graphs](Sub-graph.md) | Learn about how a Sub Graph differs from a regular shader graph, and refer to example Sub Graphs. |
| [Create a Sub Graph](Create-Sub-Graph.md) | Create a Sub Graph from existing nodes, or create an empty Sub Graph. |
| [Add a Sub Graph to a shader graph](Add-Sub-Graph-To-Shader-Graph.md) | Add a Sub Graph node to a shader graph. |
| [Add inputs and outputs to a Sub Graph](Add-Inputs-Outputs-Sub-Graph.md) | To pass data in and out of a Sub Graph, create input and output ports. |
| [Set default inputs for a Sub Graph](Sub-Graph-Default-Property-Values.md) | Add default values for the inputs of a Sub Graph. |
| [Change the behavior of a Sub Graph with a dropdown](Change-Behaviour-Sub-Graph-Dropdown.md) | Add a Dropdown node to change the behavior of a Sub Graph using a dropdown menu. |
| [Expose a Sub Graph property in the Inspector window](Sub-Graph-Promote-Property.md) | Set a property or keyword as belonging to the main shader instead of a Sub Graph. This process is known as promoting the property, or creating a nested property. |
| [Sub Graph asset](Sub-graph-Asset.md) | Learn about the Sub Graph asset. |
## Additional resources
- [Blackboard](Blackboard.md)
- [Custom Lighting samples](Shader-Graph-Sample-Custom-Lighting.md)