Unity Products:Amplify Shader Editor/Clamp and Unity Products:Amplify Shader Editor/Clip: Difference between pages
(Difference between pages)
AmplifyWiki (talk | contribs) m (1 revision imported) |
ampwiki>Amplify RnD Rick No edit summary |
||
Line 1: | Line 1: | ||
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]] | [[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]] | ||
== | == Clip Node == | ||
The | The Clip node conditionally discards a pixel before being outputted. This happens when [[#paramAlpha|Alpha]] value is less than [[#paramThreshold|Threshold]] '''(Alpha - Threshold < 0)'''. | ||
<br/> | |||
'''NOTE:''' This node can only be connected to graphs attached to Output node's fragment input ports. | |||
<img class="responsive-img" src="http://wiki.amplify.pt/images/NodeDetail/ClipNode.gif"> | |||
<img class="responsive-img" src="http://wiki.amplify.pt/images/NodeDetail/ | |||
<br/><font size="1">Nodes used: | <br/><font size="1">Nodes used: | ||
[[Unity_Products:Amplify_Shader_Editor/ | [[Unity_Products:Amplify_Shader_Editor/Texture_Sample|Texture Sample]], | ||
[[Unity_Products:Amplify_Shader_Editor/Sin_Time|Sin Time]], | |||
[[Unity_Products:Amplify_Shader_Editor/Float|Float]], | [[Unity_Products:Amplify_Shader_Editor/Float|Float]], | ||
[[Unity_Products:Amplify_Shader_Editor/ | [[Unity_Products:Amplify_Shader_Editor/Scale_And_Offset|Scale And Offset]], | ||
[[Unity_Products:Amplify_Shader_Editor/ | [[Unity_Products:Amplify_Shader_Editor/Clip|Clip]] | ||
</font> | </font> | ||
Line 22: | Line 20: | ||
! style="width: 10%;" | Node Parameter !! Description !! style="width: 10%;" | Default Value | ! style="width: 10%;" | Node Parameter !! Description !! style="width: 10%;" | Default Value | ||
|- style="background: #e5e5e5;" | | |- style="background: #e5e5e5;" | | ||
| id=" | | id="paramAlpha" | Alpha | ||
| | | First value of the clip operation. Only visible if the respective input port is not connected. | ||
| 0 | | 0 | ||
|- style="background: #e5e5e5;" | | |- style="background: #e5e5e5;" | | ||
| id=" | | id="paramThreshold" | Threshold | ||
| | | Second value of the clip operation. Only visible if the respective input port is not connected. | ||
| 0 | | 0 | ||
|} | |} | ||
Line 41: | Line 35: | ||
! style="width: 10%;" | Input Port !! Description !! style="width: 10%;" | Type | ! style="width: 10%;" | Input Port !! Description !! style="width: 10%;" | Type | ||
|- | |- | ||
| | | Input | ||
| Value to | | Value connected here is directly relayed to output port. | ||
| Float <sup id="ref1">[[#anchor|[1]]]</sup> | | Float <sup id="ref1">[[#anchor|[1]]]</sup> | ||
|- | |- | ||
| | | Alpha | ||
| | | First value of the clip operation. | ||
| Float <sup id="ref1">[[#anchor|[1]]]</sup> | | Float <sup id="ref1">[[#anchor|[1]]]</sup> | ||
|- | |- | ||
| | | Threshold | ||
| | | Second value of the clip operation. | ||
| Float <sup id="ref1">[[#anchor|[1]]]</sup> | | Float <sup id="ref1">[[#anchor|[1]]]</sup> | ||
|} | |} | ||
Line 56: | Line 50: | ||
---- | ---- | ||
# <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. | ||
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]] | [[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]] | ||
[[Category:Nodes]][[Category: | [[Category:Nodes]][[Category:Miscellaneous]] |
Revision as of 16:48, 5 December 2018
Clip Node
The Clip node conditionally discards a pixel before being outputted. This happens when Alpha value is less than Threshold (Alpha - Threshold < 0).
NOTE: This node can only be connected to graphs attached to Output node's fragment input ports.
Nodes used:
Texture Sample,
Sin Time,
Float,
Scale And Offset,
Clip
Node Parameter | Description | Default Value |
---|---|---|
Alpha | First value of the clip operation. Only visible if the respective input port is not connected. | 0 |
Threshold | Second value of the clip operation. Only visible if the respective input port is not connected. | 0 |
Input Port | Description | Type |
---|---|---|
Input | Value connected here is directly relayed to output port. | Float [1] |
Alpha | First value of the clip operation. | Float [1] |
Threshold | Second value of the clip operation. | Float [1] |