Unity Products:Amplify Shader Editor/Vertex Position and Unity Products:Amplify Shader Editor/World Space Light Dir: Difference between pages
(Difference between pages)
ampwiki>Amplify Borba No edit summary |
ampwiki>Amplify RnD Rick |
||
Line 1: | Line 1: | ||
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]] | [[Unity_Products:Amplify_Shader_Editor/Nodes | 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.<br/> | |||
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. | |||
<img class="responsive-img" src="http://wiki.amplify.pt/images/NodeDetail/ | <img class="responsive-img" src="http://wiki.amplify.pt/images/NodeDetail/WorldSpaceLightDirNode.jpg"> | ||
<br/><font size="1">Nodes used: | <br/><font size="1">Nodes used: | ||
[[Unity_Products:Amplify_Shader_Editor/ | [[Unity_Products:Amplify_Shader_Editor/World_Space_Light_Dir|World Space Light Dir]], | ||
[[Unity_Products:Amplify_Shader_Editor/ | [[Unity_Products:Amplify_Shader_Editor/World_Normal|World Normal]], | ||
[[Unity_Products:Amplify_Shader_Editor/ | [[Unity_Products:Amplify_Shader_Editor/Dot|Dot]] | ||
</font> | </font> | ||
{| class="wikitable" style="width: 100%;" | {| class="wikitable" style="width: 100%;" | ||
|- | |- | ||
! style="width: 10%;" | | ! style="width: 10%;" | Node Parameter !! Description !! style="width: 10%;" | Default Value | ||
|- | |- | ||
| id=" | | id="paramSafeNormalize" | Safe Normalize | ||
| | | Makes sure the light vector is not zero, even if there's no lights on scene. | ||
| False | |||
| | |||
|} | |} | ||
{| class="wikitable" style="width: 100%;" | {| class="wikitable" style="width: 100%;" | ||
Line 30: | Line 27: | ||
! style="width: 10%;" | Output Port !! Description !! style="width: 10%;" | Type | ! style="width: 10%;" | Output Port !! Description !! style="width: 10%;" | Type | ||
|- | |- | ||
| XYZ | | id="paramXYZ" | XYZ | ||
| Returns the | | Returns the light direction in world space coordinates. | ||
| Float3 | | Float3 | ||
|- | |- | ||
| X | | id="paramX" | X | ||
| Returns | | Returns the X component of the light direction in world space coordinates. | ||
| Float | | Float | ||
|- | |- | ||
| Y | | id="paramY" | Y | ||
| Returns | | Returns the Y component of the light direction in world space coordinates. | ||
| Float | | Float | ||
|- | |- | ||
| | | id="paramZ" | Z | ||
| Returns the Z component of the light direction in world space coordinates. | |||
| Returns | |||
| Float | | Float | ||
|} | |} | ||
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]] | [[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]] | ||
[[Category:Nodes]][[Category: | [[Category:Nodes]][[Category:Light]] |
Revision as of 11:10, 12 July 2018
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 |