Unity Products:Amplify Shader Editor/World Space Light Dir
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 |