Difference between revisions of "Unity Products:Amplify Shader Editor/Vertex To Fragment"
From Amplify Creations Wiki
Line 3: | Line 3: | ||
== Vertex To Fragment Node == | == Vertex To Fragment Node == | ||
− | The Vertex To Fragment node allows data to be calculated on the vertex function and transferred to the surface/fragment via interpolators. | + | The Vertex To Fragment node allows data to be calculated on the vertex function and transferred to the surface/fragment via interpolators.<br/> |
+ | '''NOTE 1:''' [[#paramNoInterpolation|No Interpolation]] cannot be used over the '''Standard Surface''' type as we must be able to directly control interpolators registry, which does't happen over this shader type.<br/> | ||
+ | '''NOTE 2:''' [[#paramNoInterpolation|No Interpolation]] will not work across all API's and can even throw compilation errors on some of them ( p.e. Metal and GLES 2.0 ).<br/> | ||
<img class="responsive-img" src="http://amplify.pt/NodeDetail/VertexToFragmentNode.gif"> | <img class="responsive-img" src="http://amplify.pt/NodeDetail/VertexToFragmentNode.gif"> | ||
Line 17: | Line 19: | ||
[[Unity_Products:Amplify_Shader_Editor/Multiply|Multiply]] | [[Unity_Products:Amplify_Shader_Editor/Multiply|Multiply]] | ||
</font> | </font> | ||
+ | |||
+ | {| class="wikitable" style="width: 100%;" | ||
+ | |- | ||
+ | ! style="width: 10%;" | Node Parameter !! Description !! style="width: 10%;" | Default Value | ||
+ | |- | ||
+ | | id="paramNoInterpolation" | No Interpolation | ||
+ | | When active, makes sure it uses an interpolator with the nointerpolation flag used, which prevents the values assigned to it to be interpolated on the rasterization prorcess. | ||
+ | | False | ||
+ | |} | ||
{| class="wikitable" style="width: 100%;" | {| class="wikitable" style="width: 100%;" | ||
Line 26: | Line 37: | ||
| Float <sup id="ref1">[[#anchor|[1]]]</sup> | | Float <sup id="ref1">[[#anchor|[1]]]</sup> | ||
|} | |} | ||
− | |||
---- | ---- | ||
# <span id="anchor1">'''[[#ref1|^]]'''</span> Port automatically adapts to all connection types except Matrices and [[Unity Products:Amplify Shader Editor/Texture Object|Sampler]] types. | # <span id="anchor1">'''[[#ref1|^]]'''</span> Port automatically adapts to all connection types except Matrices and [[Unity Products:Amplify Shader Editor/Texture Object|Sampler]] types. |
Revision as of 15:44, 19 November 2020
Vertex To Fragment Node
The Vertex To Fragment node allows data to be calculated on the vertex function and transferred to the surface/fragment via interpolators.
NOTE 1: No Interpolation cannot be used over the Standard Surface type as we must be able to directly control interpolators registry, which does't happen over this shader type.
NOTE 2: No Interpolation will not work across all API's and can even throw compilation errors on some of them ( p.e. Metal and GLES 2.0 ).
Nodes used:
Word Normal,
World Space Light Dir,
Dot,
Float,
Power,
Vertex To Fragment,
Light Attenuation,
Light Color,
Multiply
Node Parameter | Description | Default Value |
---|---|---|
No Interpolation | When active, makes sure it uses an interpolator with the nointerpolation flag used, which prevents the values assigned to it to be interpolated on the rasterization prorcess. | False |
Input Port | Description | Type |
---|---|---|
(VS) In | Value to be transferred to surface/fragment function. | Float [1] |