Smoothstep
SmoothstepはさまざまなコンピュータグラフィックスAPI[1][2]やゲームエンジン[3]で使用される特定の補間手法である。これは、入力された重みに基づいて、2つの値を補間する関数である。
MSDNとOpenGLの両方で、Hermite補間を使用して実装するように要求されている。
次のような実装例がAMD[4]により提供されている。
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.