Unity Products:Amplify Shader Editor/World Space Light Dir

From Amplify Creations Wiki
Revision as of 11:10, 12 July 2018 by ampwiki>Amplify RnD Rick (→‎World Space Light Dir Node)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Back to Node List

World Space Light Dir Node

The World Space Light Dir node outputs a normalized light direction vector in world space coordinates.
For directional lights, the output result is the direction from the light itself. As for point lights the resulting outputted vector is the one formed between the light position and the game object world space position.


Nodes used: World Space Light Dir, World Normal, Dot

Node Parameter Description Default Value
Safe Normalize Makes sure the light vector is not zero, even if there's no lights on scene. False


Output Port Description Type
XYZ Returns the light direction in world space coordinates. Float3
X Returns the X component of the light direction in world space coordinates. Float
Y Returns the Y component of the light direction in world space coordinates. Float
Z Returns the Z component of the light direction in world space coordinates. Float

Back to Node List