Unity Products:Amplify Shader Editor/Reflect

From Amplify Creations Wiki
Jump to navigation Jump to search

Back to Node List

Reflect Node

The Reflect node calculates a reflection vector from a given Incident vector and surface Normal vector. Internally the reflected vector is calculated via the expression Incident - 2 * Normal * Dot(Incident•Normal) Please note that the Normal vector should be normalized since this way the resulting reflected vector will have the same length as the original Incident one.

A cast is done to match the input type with the most amount of channels if Normal and Incident vectors have different channel amounts. This will also determine the reflected vector size.


Nodes used: View Dir, Negate, World_Normal, Reflect, Texture Sample

Node Parameter Description Default Value
Incident Incident vector. Only visible if the respective input port is not connected. 0,0,0,0
Normal Normal vector ( should be normalized beforehand ). Only visible if the respective input port is not connected. 0,0,0,0


Input Port Description Type
Incident Incident vector. Float4 [1]
Normal Normal vector ( should be normalized beforehand ). Float4 [1]

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

Back to Node List