Unity Products:Amplify Shader Editor/Distance: Difference between revisions

From Amplify Creations Wiki
Jump to navigation Jump to search
ampwiki>Amplify RnD Rick
No edit summary
 
m (1 revision imported)
 
(No difference)

Latest revision as of 00:06, 2 December 2023

Back to Node List

Distance Node

The Distance node outputs the euclidean distance between two values or vectors A and B which can be seen as the following operation Sqrt( Dot( B - A, B - A )).
If different data types are connected to each port then a cast will always be done to the port type with most channels.


Nodes used: World Position, Vector3, Distance,

Node Parameter Description Default Value
A First point. Only visible if the respective input port is not connected. 0
B Second point. Only visible if the respective input port is not connected. 0
Input Port Description Type
A First point. Float4 [1]
B Second point. Float4 [1]

  1. ^ Port automatically adapts to all connection types except Matrices and Sampler types.

Back to Node List