Clamp

The clamping is a process used to restruct a value between a min and max values. If the initial value is lower than the min, the function will return the min. If the initial value is higther than the max, the function will return the max.

For a texture, it can be useful if you want to avoid wrapping artefact, or if you don't want the texture to tile. you can also use it for UV coordinates.

Here is some pseudo code  : function clamp(x, min, max): if (x < min) then x = min; else if (x > max) then x = max; return x; end clamp