What "clamp" checkbox mean in shader nodes?

Yes, clamp just clips off values above and below the clamp points, just like you’ve drawn. Your drawing right there shows exactly what happens with inputs outside of the 0-1 range: they’re clamped, same as anything else.

Plugging a value directly into the output will give you exactly that: the value. No extra curving. Any curve you think you’re seeing in Material Preview could be from the view transform (Filmic, AgX, etc), but that doesn’t affect the underlying values, just how they’re mapped to your display: the value inside the render is exactly what you plugged into it.

Mapping values to a new min and max is what the Map Range node is for: mapping 0-2 to 0-1, for example, will mean the values that were 1 become 0.5, 1.5 becomes 0.75, etc. Mapping 0.5-1 to 0-2 means 0.5 will become 0, 0.75 will become 1, 0.25 will become -1, 0 will become -2. And so on. (Assuming the interpolation is set to linear. Map Range also offers curved interpolation options.)

1 Like