dpdxFine
dpdx measured per pixel rather than per 2×2 pixel block.
dpdxFine(x: Val): Expr
Import math from shaders/std and use math.dpdxFine.
Plain derivatives may be shared by each 2×2 block of pixels, so anything scaled by them can step in a 2-pixel grid. Use the fine forms when a derivative drives a visible quantity.
Parameters
| Name | Type | Notes |
|---|---|---|
x | Val |
Example
const stepX = dpdxFine(lookupUV)
See also
dpdx— How much a value changes from this pixel to the next one to the right.dpdyFine—dpdymeasured per pixel rather than per 2×2 pixel block.fwidthFine—fwidthmeasured per pixel rather than per 2×2 pixel block.