Unity Products:Amplify Shader Editor/Refract

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

Refract Node

The Refract node calculates a refraction vector from a given Incident vector, a surface Normal vector and a ratio of Index of Refractions at the surface's interface. Both Normal and Incident vector should be normalized.

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 refracted vector size.


Nodes used: View Dir, Negate, World_Normal, Float, Refract, Texture Sample

Node Parameter Description Default Value
Incident Incident vector ( should be normalized beforehand ). 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
Eta Ratio of index of refraction, determines amount of incident ray that is refracted. Only visible if the respective input port is not connected. 0


Input Port Description Type
Incident Incident vector ( should be normalized beforehand ). Float4 [1]
Normal Normal vector ( should be normalized beforehand ). Float4 [1]
Eta Ratio of index of refraction, determines amount of incident ray that is refracted. Float

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

Back to Node List