Unity Products:Amplify Shader Editor/Switch by Face

From Amplify Creations Wiki
Revision as of 08:56, 25 August 2021 by ampwiki>Amplify RnD Rick
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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