Website Header Slim

Derive Node Reference

Clamp Node

Description

The clamp node clamps the input value between two given values min and max. Every value of every channel that is smaller than the specified minimum value, will equal the minimum value, while being greater than the maximum value will set it equal to the maximum value:

 

if (input < min) input = min;

if (input > max) input = max;

Sample Tree

Properties

Property Name Property Type Description
Min
Float
Uniform float to be used as the minimum for the clamp operation (only available if the Min-input is not connected).
Max
Float
Uniform float to be used as the maximum for the clamp operation (only available if the Max-input is not connected).

Inputs

Input Name Allowed Data Types Description
Input
Float, RGBA
Input that takes the texture to be clamped between Min and Max.
Min
Float, RGBA
Input that takes minimum values for each pixel. If unconnected a uniform float will be used for all pixels (see properties).
Max
Float, RGBA
Input that takes maximum values for each pixel. If unconnected a uniform float will be used for all pixels (see properties).

Outputs

Output Name Data Type Description
Output
Float if all inputs are of type float, otherwise RGBA.
Outputs a clamped texture whereas the value of every channel for every pixel is clamped between Min and Max. Min and Max can be different for each pixel, if the respective inputs are connected, otherwise all values will be clamped between uniform floats (see properties).

Login