Derive Node Reference

Clamp 0-1 Node

Description

The Clamp 0-1 node clamps the input value between two values, similar to the Clamp Node, the difference being, that the minimum and maximum values can not be chosen and are instead set to the 0-1-range. Every value of every channel that is smaller than zero, will be set to zero, while being greater than one will set it equal to one:

 

 

if (input < 0) input = 0;

if (input > 1) input = 1;

 

Using this node is useful to avoid having values outside the 0-1-range as the final result, since such results would look correct in the editor, but not in the exported data, since that data is automatically clamped between zero and one. Hence making sure, that the final result is within that range, will prevent exported data from being wrong.

 

Since pixel values greater than one and smaller than zero can not be rendered, it is difficult to spot values outside the 0-1-range with the naked eye. The output will thus look like the input, which does not mean however, that the two are the same.

Sample Tree

Properties

None

Inputs

Input Name Allowed Data Types Description
Input
Float, RGBA
Input that takes the texture to be clamped between 0 and 1.

Outputs

Output Name Data Type Description
Output
= Input Data Type
Outputs a clamped texture whereas the value of every channel for every pixel is clamped between 0 and 1.

Login