Unity Products:Amplify Shader Editor/Vertex Position

From Amplify Creations Wiki
Jump to navigation Jump to search

Back to Node List

Vertex Position Node

The Vertex Position node outputs the vertices position in object space. This data is extracted directly from the mesh and contains the vertex position relative to the object origin, this means the position values don't change whatever transform value your gameobject has. This is usually useful to use in the Local Vertex Offset 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.
Depending on where this node is being used ( vertex or fragment/surface function ) it will either return a direct value ( on vertex functions ) or an interpolated value between vertices( on fragment/surface functions ).

NOTE: Do not confuse with World Position node.


Nodes used: Texture Sample, Vertex Position, Saturate, Lerp

Input Port Description Type
Size The size of the position vector.
  • XYZ: Retrieves the 3 coordinates position.
  • XYZW: Retrieves the 3 coordinates position and one more. This is mostly useful to facilitate matrix transformation operations where the W value is needed with the value 1 or if you want to retrieve packed data in the W channel.
XYZ
Output Port Description Type
XYZ(W) Returns the vertex position in object space Float3(4)
X Returns only the X component of the vertex position Float
Y Returns only the Y component of the vertex position Float
Z Returns only the Z component of the vertex position Float
W Returns only the W component of the vertex position (By default set to 1). Only visible if Size is set to XYZW. Float

Back to Node List