Unity Products:Amplify Shader Editor/Reflect: Difference between revisions
Jump to navigation
Jump to search
ampwiki>Kebrus mNo edit summary |
AmplifyWiki (talk | contribs) m (1 revision imported) |
(No difference)
|
Latest revision as of 00:06, 2 December 2023
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] |