Unity Products:Amplify Shader Editor/Refract and Unity Products:Amplify Shader Editor/Texture 0 Matrix: Difference between pages

From Amplify Creations Wiki
(Difference between pages)
Jump to navigation Jump to search
ampwiki>Kebrus
mNo edit summary
 
m (1 revision imported)
 
Line 1: Line 1:
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]
<span style="color:#c00;display:block;">This page is under construction!</span>


== Refract Node ==
<img style="float:left; margin-right:10px;" src="http://wiki.amplify.pt/images/Nodes/Texture0Matrix.jpg">
[[Unity Products:Amplify Shader Editor/Texture 0 Matrix|'''Texture 0 Matrix''']]


The Refract node calculates a refraction vector from a given [[#paramIncident|Incident]] vector, a surface [[#paramNormal|Normal]] vector and a ratio of [[#paramEta|Index of Refractions]] at the surface's interface.
Texture 0 Matrix
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.
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List ]]
 
[[Category:Nodes]][[Category:Matrix Transform]]
<img class="responsive-img" src="http://wiki.amplify.pt/images/NodeDetail/RefractNode.gif">
<br/><font size="1">Nodes used:
[[Unity_Products:Amplify_Shader_Editor/View_Dir|View Dir]],
[[Unity_Products:Amplify_Shader_Editor/Negate|Negate]],
[[Unity_Products:Amplify_Shader_Editor/World_Normal|World_Normal]],
[[Unity_Products:Amplify_Shader_Editor/Float|Float]],
[[Unity_Products:Amplify_Shader_Editor/Refract|Refract]],
[[Unity_Products:Amplify_Shader_Editor/Texture Sample|Texture Sample]]
</font>
{| class="wikitable" style="width: 100%;"
|-
! style="width: 10%;" | Node Parameter !! Description !! style="width: 10%;" | Default Value
|- style="background: #e5e5e5;" |
| id="paramIncident" | Incident
| Incident vector ( should be normalized beforehand ). Only visible if the respective input port is not connected.
| 0,0,0,0
|- style="background: #e5e5e5;" |
| id="paramNormal" | Normal
| Normal vector ( should be normalized beforehand ). Only visible if the respective input port is not connected.
| 0,0,0,0
|- style="background: #e5e5e5;" |
| id="paramEta" | 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
|}
 
 
 
{| class="wikitable" style="width: 100%;"
|-
! style="width: 10%;" | Input Port !! Description !! style="width: 10%;" | Type
|-
| Incident
| Incident vector ( should be normalized beforehand ).
| Float4 <sup id="ref1">[[#anchor|[1]]]</sup>
|-
| Normal
| Normal vector ( should be normalized beforehand ).
| Float4 <sup id="ref1">[[#anchor|[1]]]</sup>
|-
| Eta
| Ratio of index of refraction, determines amount of incident ray that is refracted.
| Float
|}
 
----
# <span id="anchor1">'''[[#ref1|^]]'''</span> Port automatically adapts to all connection types except Matrices and [[Unity Products:Amplify Shader Editor/Texture Object|Sampler]] types.
 
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]
[[Category:Nodes]][[Category:Vector Operators]]

Latest revision as of 00:06, 2 December 2023

This page is under construction!

Texture 0 Matrix

Texture 0 Matrix

Back to Node List