SmoothstepはさまざまなコンピュータグラフィックスAPIMicrosoft Developer NetworkでのSmoothstepGLSL 言語仕様書, バージョン 1.40やゲームエンジンUnity game engine SmoothStep documentationで使用される特定の補間手法である。これは、入力された重みに基づいて、2つの値を補間する関数である。

MSDNとOpenGLの両方で、Hermite補間を使用して実装するように要求されている。

次のような実装例がAMDATI R3x0 Pixel Shadersにより提供されている。

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);

参照

外部リンク Using smoothstep (in the RenderMan Shading Language) by Prof. Malcolm Kesson.