◄ Wiki / Graphics
screen-space derivative
How fast a value changes from one pixel to the next on screen, computed by comparing neighboring pixels.
Functions like dFdx and dFdy tell a shader how much a variable (say a texture coordinate) differs between adjacent horizontal or vertical pixels. GPUs compute this by shading pixels in tiny 2x2 groups and subtracting neighbors. It is essential for choosing the right texture mip level and for effects that depend on surface detail or edges.
See also
- shaderA small program that runs on the GPU to compute part of how a scene is drawn.
- samplerA GPU object that describes how a texture should be read — how it's filtered and how coordinates outside its edges behave.
- sample-rate / per-sample shadingRunning a pixel's shading calculation separately for each anti-aliasing sample instead of once for the whole pixel.