2.1 KiB
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. |
Related nodes
[!includenodes-related] Branch On Input Connection node: