Branch Node
Description
This node provides a dynamic branch to the shader. If input Condition is true, the return output will be equal to input True, otherwise it will be equal to input False. This is determined per vertex or per pixel depending on shader stage.
The compilation mode of the branch can be selected with the Mode dropdown parameter (double-click somewhere inside the node to see the dropdown):
- Flatten — evaluate both sides of the branch and choose between the two resulting values. However, if the Condition receives a Constant as a value, one of the branches won't be used at all.
- Branch (DirectX only) — evaluate only one side of the branch depending on the given condition. Available only for DirectX Graphics API.
- Auto — the compiler auto selects the most appropriate mode.
Last update:
2024-12-13
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)