Unity Products:Amplify Shader Editor/Transform Direction

From Amplify Creations Wiki
Revision as of 00:06, 2 December 2023 by AmplifyWiki (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Back to Node List

Transform Direction node

The Transform Direction node transforms a given direction vector between different spaces.


Nodes used: Vertex Normal, Transform Direction, World Space Light Dir, Dot, Saturate

Node Parameter Description Default Value
From Current space from which input vector is on.
  • Object Space: Sets input direction space to Object space
  • World Space: Sets input direction space to World space
  • View Space: Sets input direction space to View space
  • Tangent: Sets input direction space to Tangent space
Object Space
To Space for the position to be transformed to.
  • Object Space: Sets output direction space to Object space
  • World Space: Sets output direction space to World space
  • View Space: Sets output direction space to View space
  • Tangent: Sets output direction space to Tangent space
  • Clip: Sets output direction space to Clip space
Object Space
Inverse TBN To transform from tangent to another space an inverse TBN matrix(Tangent,Binormal,Normal) must be calculated. Inverting matrices in an heavy operation but in this transforms case it can be simplified at the cost of some precision loss. (Only shown on when From is set to Tangent).
  • Fast: More performant but less precise inverse TBN matrix generation.
  • Precise: Inverse TBN matrix generation created through fully mathematical matrix inversion operation.
Fast
Normalize Do a Normalize operation over the final calculated vector. False
Input Direction vector in selected input space to be transformed into selected output space. Only visible if the respective input port is not connected. 0,0,0


Input Port Description Type
In Direction vector in selected input space to be transformed into selected output space. Float3
Output Port Description Type
XYZ Returns the transformed vector in the specified space. Float3
X Returns only the X component of the transformed vector in the specified space. Float
Y Returns only the Y component of the transformed vector in the specified space. Float
Z Returns only the Z component of the transformed vector in the specified space. Float

Back to Node List