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

2.1 KiB

Branch On Input Connection node

The Branch On Input Connection node allows you to change the behavior of a Sub Graph based on the connected state of an input property in the parent shader graph. Use the Branch On Input Connection node to create a default input for a port.

For more information, refer to Set default inputs for a Sub Graph.

The node generates branching HLSL source code, but during compilation Unity optimizes the branch out of your shader.

Compatibility

The Branch On Input Connection [!includenodes-compatibility-all]

You can only use a Branch on Input Connection node in a Sub Graph.

Inputs

The Branch On Input Connection [!includenodes-inputs]

Name Type Description
Input Property The property that determines the branching logic in the node, based on its connection state in the parent Shader Graph.
Connected Dynamic Vector The value to send to the Out port when Input is connected in the parent Shader Graph.
NotConnected Dynamic Vector The value to send to the Out port when Input isn't connected in the parent Shader Graph.

Outputs

The Branch On Input Connection [!includenodes-single-output]

Name Type Description
Out Dynamic Vector Outputs the value of either Connected or NotConnected, based on the Input property's connection state in the parent Shader Graph.

[!includenodes-related] Branch On Input Connection node: