Difference between revisions of "Unity Products:Amplify Shader Editor/Vertex Normal"

From Amplify Creations Wiki
Jump to: navigation, search
Line 1: Line 1:
 
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]
 
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]
== Vertex Normal ==
+
== Vertex Normal Node ==
  
Per vertex interpolation of the vertices normal vector in object space. This data is extracted directly from the mesh and contains the vertex normal relative to the object origin, this means the normal vector values don't change whatever transform value your gameobject has. This is usually useful to use in the '''Local Vertex Normal''' output or to create effects that are bound to the object and stay exactly the same even if your gameobject changes position, rotation or size.
+
The Vertex Normal Node outputs the vertices normal vectors in object space. This data is extracted directly from the mesh and contains the vertex normal relative to the object origin, this means the normal vector values don't change whatever transform value your game object has. This is usually useful to use in the '''Local Vertex Normal''' output or to create effects that are bound to the object and stay exactly the same even if your game object changes position, rotation or size.
 +
Depending on where this node is being used (vertex or fragment/surface function) it will either return direct value ( on vertex functions ) or an interpolated value between vertices( on fragment/surface functions ).  
  
 
'''NOTE:''' Do not confuse with [[Unity Products:Amplify Shader Editor/World Normal|World Normal]] node.  
 
'''NOTE:''' Do not confuse with [[Unity Products:Amplify Shader Editor/World Normal|World Normal]] node.  
  
 
<img class="responsive-img" src="http://amplify.pt/NodeDetail/VertexNormalNode.gif">
 
<img class="responsive-img" src="http://amplify.pt/NodeDetail/VertexNormalNode.gif">
 
+
<br/><font size="1">Nodes used:
 +
[[Unity_Products:Amplify_Shader_Editor/Texture_Sample|Texture Sample]],
 +
[[Unity_Products:Amplify_Shader_Editor/Vertex_Normal|Vertex Normal]],
 +
[[Unity_Products:Amplify_Shader_Editor/Saturate|Saturate]]
 +
</font>
  
 
{| class="wikitable" style="width: 100%;"
 
{| class="wikitable" style="width: 100%;"
Line 14: Line 19:
 
|-  
 
|-  
 
| XYZ
 
| XYZ
| Returns the interpolated vertex normal in object space
+
| Returns the vertex normal vector in object space
 
| Float3(4)
 
| Float3(4)
 
|-  
 
|-  

Revision as of 13:29, 25 October 2017

Back to Node List

Vertex Normal Node

The Vertex Normal Node outputs the vertices normal vectors in object space. This data is extracted directly from the mesh and contains the vertex normal relative to the object origin, this means the normal vector values don't change whatever transform value your game object has. This is usually useful to use in the Local Vertex Normal output or to create effects that are bound to the object and stay exactly the same even if your game object changes position, rotation or size. Depending on where this node is being used (vertex or fragment/surface function) it will either return direct value ( on vertex functions ) or an interpolated value between vertices( on fragment/surface functions ).

NOTE: Do not confuse with World Normal node.


Nodes used: Texture Sample, Vertex Normal, Saturate

Output Port Description Type
XYZ Returns the vertex normal vector in object space Float3(4)
X Returns only the X component of the vertex normal Float
Y Returns only the Y component of the vertex normal Float
Z Returns only the Z component of the vertex normal Float

Back to Node List