Unity Products:Amplify Shader Editor/Switch by Face

From Amplify Creations Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Back to Node List

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]

  1. ^ Port automatically adapts to all connection types except Matrices and Sampler types.

Back to Node List