定义
ddx/ddy用于返回屏幕空间中某一值关于x,y方向上的偏导数。它只可以用于fragment program中,参数必须来自fragment的输入。
HLSL对ddx的定义:Returns the partial derivative of the specified value with respect to the screen-space x-coordinate.
GLSL中对应的函数为dFdx/dFdy
ddx/ddy用于返回屏幕空间中某一值关于x,y方向上的偏导数。它只可以用于fragment program中,参数必须来自fragment的输入。
HLSL对ddx的定义:Returns the partial derivative of the specified value with respect to the screen-space x-coordinate.
GLSL中对应的函数为dFdx/dFdy