step函数
step (a, x)
{
if (a<x)
{
return 1;
}
else
{
return 0;
}
}
lerp
float lerp(float a, float b, float w) {
return a + w*(b-a);
}
smoothstep(x, y, s):
Returns 0 if x < a < b or x > a > b
Returns 1 if x < b < a or x > b > a
Returns a value in the range [0,1] for the domain [a,b]. return (s-x)/(y-x) ;