Is there any intrinsic function in GLSL for: clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0)

Is there any intrinsic function in GLSL for: clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0)
which is part of smoothstep

No.

If there was, it would be in §8.3 (Common Functions) of the GLSL specification (it doesn’t fit into any of the other categories).

1 Like