I am looking into smoothstep(edge0, edge1, x) function.
docs say results are undefined if edge0 >= edge1.
In a shader there is a line:
smoothstep(radius + SIZE, radius + SIZE / 1.2, dist);
this means edge0 >= edge1 it still works fine, how is that possible?
Looks to me like the docs are wrong.
Here's from playing around with smoothstep:
y = smoothstep(1.0,-1.0,x);y = smoothstep(-1.0,1.0,x);It looks like when edge0 > edge1, it flips the side at 1 to be at negative infinity, and the side at 0 to be at positive infinity.
Another example:
Changing y to a step from 0.9 to 0.1 changes the output to this: