FANDOM


Ddy

Name Edit

DDY - returns approximate partial derivative with respect to window-space Y.

Synopsis Edit

vector1 ddx(vector1 a);
vector2 ddx(vector2 a);
vector3 ddx(vector3 a);
vector4 ddx(vector4 a);

Parameters Edit

a
Vector or scalar of which to approximate the partial derivative with respect to window-space Y.

Description Edit

Returns approximate partial derivative of a with respect to the window-space (vertical) ycoordinate.

For vectors, the returned vector contains the approximate partial derivative of each element of the input vector.

This function is only available in fragment program profiles (but not all of them).

The specific way the partial derivative is computed is implementation-dependent. Typically fragments are rasterized in 2x2 arrangements of fragments (called quad-fragments) and the partial derivatives of a variable is computed by differencing with the adjacent horizontal fragment in the quad-fragment.

The partial derivative computation may incorrect when ddy is used in control flow paths where not all the fragments within a quad-fragment have branched the same way.

The partial derivative computation may be less exact (wobbly) when the variable is computed based on varying parameters interpolated with centroid interpolation.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.