An Introduction to shader derivative functions(翻译)
请尊重原作者的工作,转载时请务必注明转载自:www.xionggf.com
原文地址
Partial difference derivative functions (ddx and ddy in HLSL[a], dFdx and dFdy in GLSL[b]) (in the rest of this article I will use both terms according to the code examples I will provide) are fragment shader instructions wich can be used to compute the rate of variation of any value with respect to the screen-space coordinates.
偏导数函数(在HLSL中为ddx和ddy,GLSL中为dFdx和dFdy)。在本文的其余部分中,我将根据我将提供的代码示例使用这两个术语)都是可以使用的片元着色器指令,可用于计算任何数值相对于 屏幕空间坐标 的变化率。
Derivatives computation During triangles rasterization, GPUs run many instances of a fragment shader at a time organizing them in blocks of 2×2 pixels.