Smoothstep
Appearance
Smoothstep is the name given to a specialized interpolation technique present in several independent computer graphics APIs[1][2] and game engines[3]. It is a function that interpolates smoothly between two input values based on a weight which is also provided as an input value to the function.
It is claimed in both the MSDN and OpenGL documentation that the function has been implemented using Hermite interpolation.
An example implementation provided by AMD[4] follows.
float smoothstep (float edge0, float edge1, float x)
{
// Scale, bias and saturate x to 0..1 range
x = saturate((x - edge0) / (edge1 - edge0));
// Evaluate polynomial
return x*x*(3-2*x);
}
References
External links
- Using smoothstep (in the RenderMan Shading Language) by Prof. Malcolm Kesson.