dFdx(fragAttrib) and dFdy(fragAttrib) compute derivatives of certain given attribute between two adjacent fragments.
If currently being processed fragment is f(x, y), x and y refer to the position of this fragment in SCREEN SPACE, then
1. dFdx(fragAttrib) calculates the derivative of "fragAttrib" between f(x, y) and f(x+1, y), atually is the "fragAttrib" value of f(x+1, y)
subtracted by the value of "fragAttrib" of f(x, y);
2. dFdy(fragAttrib) calculates the derivative of "fragAttrib" between f(x, y) and f(x, y+1), atually is the "fragAttrib" value of f(x, y+1)
subtracted by the value of "fragAttrib" of f(x, y);
///
CAUTION!
1. Since dFd{x, y}() are used to compute derivatives, so if a constant is the parameter, the return value is permanently ZERO!
2. The prototype is genType dFd{x, y}(genType fr
If currently being processed fragment is f(x, y), x and y refer to the position of this fragment in SCREEN SPACE, then
1. dFdx(fragAttrib) calculates the derivative of "fragAttrib" between f(x, y) and f(x+1, y), atually is the "fragAttrib" value of f(x+1, y)
subtracted by the value of "fragAttrib" of f(x, y);
2. dFdy(fragAttrib) calculates the derivative of "fragAttrib" between f(x, y) and f(x, y+1), atually is the "fragAttrib" value of f(x, y+1)
subtracted by the value of "fragAttrib" of f(x, y);
///
CAUTION!
1. Since dFd{x, y}() are used to compute derivatives, so if a constant is the parameter, the return value is permanently ZERO!
2. The prototype is genType dFd{x, y}(genType fr