Unity Products:Amplify Shader Editor/Texture Coordinates

From Amplify Creations Wiki
Jump to navigation Jump to search

Back to Node List

Texture Coordinates

The Texture Coordinate node ( shortcut: U key ) uses the mesh UVs and manipulates it according to the texture tilling and offset parameters to define how a texture is mapped onto a 3d asset. If the Tex port is connected to a Texture Object or if one is referenced in the node property panel they are transformed by that texture fields in the material inspector. Otherwise the coordinates are transformed with the node's parameters or inputs.


Nodes used: Texture Object, Texture Coordinates, Texture Sample

Node Parameter Description Default Value
Reference Points to an existing Texture Object or Texture Sample node
  • None: Let's you turn off referencing altogether
  • Option #: All other options are dynamically generated and point to all the available texture nodes in the graph
None
Coord Size The size of the main output port which allows you to read more packed data from vertex coordinates. Dynamically changes output ports accordingly.
  • Float[2,4]: Changes size from Float2 to Float4
Float2
UV Set The UV channel used, also knows as UV Index in some applications. Set 2 is usually used for Lightmap UV coordinates.
  • [1,8]: Changes set to specified number from set 1 to set 8. Please that Unity 2018.1 and below only allows from 1 to 4.
1
Other Parameters
Tilling Serves as a constant multiplier of UVs that makes them change in size, effectively creating a tilling pattern. Only available if Reference is set to None or if the equivalent input port is not connected. ( 1, 1 )
Offset Adds a constant value to UVs that makes them move in a desired direction, effectively offsetting it from the original position. Only available if Reference is set to None or if the equivalent input port is not connected. ( 0, 0 )


Input Port Description Type
Tex This port accepts a Texture Object which allows the use of it's texture UV parameters. Overriding the node tilling and offset and using the material inspector instead. Sampler2D
Tilling Dynamic version of the parameter Tilling. Only available if Reference is set to None, otherwise gets locked to indicate that uses the tilling of the texture property in the material inspector. Float2
Offset Dynamic version of the parameter Offset. Only available if Reference is set to None, otherwise gets locked to indicate that uses the Offset of the texture property in the material inspector. Float2
Output Port Description Type
UV(WT) Returns a vector2, vector3 or vector4 containing U and V coordinates respectively in case of vector2, UVW coordinates for vector3 and UVWT for vector4 Float2(34)
U Returns a float containing the U coordinate Float
V Returns a float containing the V coordinate Float
W Returns a float containing the W coordinate. Only available if Coord Size is set to Float3. Float
T Returns a float containing the T coordinate. Only available if Coord Size is set to Float4. Float

Back to Node List