http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Clamp&feed=atom&action=historyUnity Products:Amplify Shader Editor/Clamp - Revision history2024-03-28T16:21:44ZRevision history for this page on the wikiMediaWiki 1.40.1http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Clamp&diff=139&oldid=prevAmplifyWiki: 1 revision imported2023-12-02T00:06:04Z<p>1 revision imported</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 00:06, 2 December 2023</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>AmplifyWikihttp://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Clamp&diff=138&oldid=prevampwiki>Amplify RnD Rick at 16:03, 12 July 20182018-07-12T16:03:50Z<p></p>
<p><b>New page</b></p><div>[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]<br />
<br />
== Clamp Node ==<br />
<br />
The Clamp node outputs its [[#paramInput|Input]] value or individual components of vectors clamped between the [ [[#paramMin|Min]] , [[#paramMax|Max]] ] range.<br />
* '''Min:''' This value is returned if input value is less than Min<br />
* '''''Input:''''' This value is returned if input value is between Min and Max<br />
* '''Max:''' This value is returned if input value greater than Max<br />
<br />
'''NOTE:''' If each input port have different channel amounts a cast is done to match the one with the most amount of channels.<br />
<br />
<img class="responsive-img" src="http://wiki.amplify.pt/images/NodeDetail/ClampNode.gif"><br />
<br/><font size="1">Nodes used: <br />
[[Unity_Products:Amplify_Shader_Editor/Vertex_TexCoord|Vertex TexCoord]], <br />
[[Unity_Products:Amplify_Shader_Editor/Float|Float]],<br />
[[Unity_Products:Amplify_Shader_Editor/Clamp|Clamp]], <br />
[[Unity_Products:Amplify_Shader_Editor/Texture_Sample|Texture Sample]]<br />
</font><br />
<br />
{| class="wikitable" style="width: 100%;"<br />
|-<br />
! style="width: 10%;" | Node Parameter !! Description !! style="width: 10%;" | Default Value<br />
|- style="background: #e5e5e5;" |<br />
| id="paramInput" | ''Input''<br />
| Value to be clamped between the [ Min , Max ] range. Only visible if the respective input port is not connected.<br />
| 0<br />
|- style="background: #e5e5e5;" |<br />
| id="paramMin" | Min <br />
| Minimum value of the clamp operation, if value is less than Min than this is the returned value. Only visible if the respective input port is not connected.<br />
| 0<br />
|- style="background: #e5e5e5;" |<br />
|id="paramMax" | Max <br />
| Maximum value of the clamp operation, if value is greater than Max than this is the returned value. Only visible if the respective input port is not connected.<br />
| 1<br />
|}<br />
<br />
<br />
<br />
{| class="wikitable" style="width: 100%;"<br />
|- <br />
! style="width: 10%;" | Input Port !! Description !! style="width: 10%;" | Type<br />
|- <br />
| ''Input''<br />
| Value to be clamped between the [ Min , Max ] range. Fully outputted when ''Alpha = 0''.<br />
| Float <sup id="ref1">[[#anchor|[1]]]</sup><br />
|- <br />
| Min<br />
| Minimum value of the clamp operation, if value is less than Min than this is the returned value.<br />
| Float <sup id="ref1">[[#anchor|[1]]]</sup><br />
|-<br />
| Max<br />
| Maximum value of the clamp operation, if value is greater than Max than this is the returned value.<br />
| Float <sup id="ref1">[[#anchor|[1]]]</sup><br />
|}<br />
<br />
----<br />
# <span id="anchor1">'''[[#ref1|^]]'''</span> Port automatically adapts to all connection types except Matrices and [[Unity Products:Amplify Shader Editor/Texture Object|Sampler]] types.<br />
<br />
----<br />
{| style="width: 100%; horizontal-align: right;" <br />
|<br />
Math Operators - Max/Min/Clamp <br />
|{{#evt:<br />
service=youtube<br />
|id=https://youtu.be/R0yyoqgpdg8<br />
|alignment=right<br />
}}<br />
|}<br />
<br />
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]<br />
[[Category:Nodes]][[Category:Math Operators]]</div>ampwiki>Amplify RnD Rick