Unity Products:Amplify Shader Editor/Clamp

From Amplify Creations Wiki
Revision as of 00:06, 2 December 2023 by AmplifyWiki (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Back to Node List

Clamp Node

The Clamp node outputs its Input value or individual components of vectors clamped between the [ Min , Max ] range.

  • Min: This value is returned if input value is less than Min
  • Input: This value is returned if input value is between Min and Max
  • Max: This value is returned if input value greater than Max

NOTE: If each input port have different channel amounts a cast is done to match the one with the most amount of channels.


Nodes used: Vertex TexCoord, Float, Clamp, Texture Sample

Node Parameter Description Default Value
Input Value to be clamped between the [ Min , Max ] range. Only visible if the respective input port is not connected. 0
Min 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. 0
Max 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. 1


Input Port Description Type
Input Value to be clamped between the [ Min , Max ] range. Fully outputted when Alpha = 0. Float [1]
Min Minimum value of the clamp operation, if value is less than Min than this is the returned value. Float [1]
Max Maximum value of the clamp operation, if value is greater than Max than this is the returned value. Float [1]

  1. ^ Port automatically adapts to all connection types except Matrices and Sampler types.

Math Operators - Max/Min/Clamp

Back to Node List