Unity Products:Amplify Shader Editor/Switch by Face
Switch by Face Node
The Switch by Face outputs relays one of its inputs according to if the rendered surface is facing the camera ( Front ) or facing away from the camera ( Back ).
NOTE: This node initially was only valid over fragment ports as it uses a face semantic over the fragment function signature to get the value. Now it also work on vertex ports but at the expense of additional instructions as it needs to be manually calculated and its not as precise as the one given by the face semantic.
Nodes used:
Color,
Switch by Face,
Vector3,
Float
Node Parameter | Description | Default Value |
---|---|---|
Front | Value to be used on front faces. Only visible if the respective input port is not connected. | 0 |
Back | Value to be used on back faces. Only visible if the respective input port is not connected. | 0 |
Input Port | Description | Type |
---|---|---|
Front | Value to be used on front faces. | Float [1] |
Back | Value to be used on back faces. | Float [1] |