study/first_study/Library/PackageCache/com.unity.shadergraph@3686fafd4720/Documentation~/Sub-graphs.md
jh04010421 739d49f1a0 Unity | 2026.01.20
수업 실습 파일
2026-01-20 11:01:57 +09:00

1.6 KiB

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 Learn about how a Sub Graph differs from a regular shader graph, and refer to example Sub Graphs.
Create a Sub Graph Create a Sub Graph from existing nodes, or create an empty Sub Graph.
Add a Sub Graph to a shader graph Add a Sub Graph node to a shader graph.
Add inputs and outputs to a Sub Graph To pass data in and out of a Sub Graph, create input and output ports.
Set default inputs for a Sub Graph Add default values for the inputs of a Sub Graph.
Change the behavior of a Sub Graph with a dropdown 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 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 Learn about the Sub Graph asset.

Additional resources