Unity Products:Amplify Shader Editor/View Dir

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

View Dir Node

The View Dir node outputs the current camera view direction on a coordinates space defined by the Space parameter.
World Space coordinates will be the most commonly used option but Tangent Space is also very helpful mostly with operations over normal maps ( which are usually in tangent space ).


Nodes used: Texture Sample, World Normal, View Dir, Dot, One Minus

Node Parameter Description Default Value
Space Specify the coordinate space to which the View Dir should be outputted
  • World: Coordinate space based on absolute world coordinates.
  • Tangent: Coordinate space based on a surface tangent plane.
World Space
Safe Normalize Makes sure view vector is not zero, even when scene has no cameras. False
Output Port Description Type
XYZ Returns the camera view direction in the selected coordinates space Float3
X Returns only the X component of the camera view direction Float
Y Returns only the Y component of the camera view direction Float
Z Returns only the Z component of the camera view direction Float

Back to Node List