Unity Products:Amplify Shader Editor/Function Switch

From Amplify Creations Wiki
Jump to: navigation, search

Back to Node List

Function Switch Node

The Function Switch allows adding options to a shader function. These options will determine which input port over its Function Switch is to be traveled.

Please use the following link for more in-depth information on shader functions.
NOTE: Function Switch options cannot be changed at run time. For an option to take effect over a shader, it will need to be compiled.


Nodes used: Screen Depth, Surface Depth, Subtract, Float, Divide, Function Subtitle, Saturate, Function Switch, Function Output

Node Parameter Description Default Value
Mode Determines if current node creates a new option or uses an already created one over another Function Switch
  • Object: Creates a new option
  • Reference: Uses option created by referenced Function Switch
Object
Option Label Name of the option as it will be displayed over its shader function node. Option
Toggle Mode Sets the option as a Toggle button with only two input ports/paths labeled as False and True. False
Amount Amount of items an option will have. Has direct connection with amount of input ports that will be created. Only visible if Toggle Mode is set to False. 2
Item # Item label as it will be presented over the option on the shader function. Only visible if Toggle Mode is set to False. In #
Current Current item/input port that is selected. In 0


Input Port Description Type
In # Connect a sub-graph to be followed if its item is currently selected over the option. Float

Back to Node List