dpdy()
Function in Builtins
dpdy(x): the screen-space partial derivative of x along the Y axis, component-wise; the partner of dpdx, with the same GPU-only and fragment-only constraints.
import { dpdy } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
const dpdy: <K extends FloatKey>(x: ReadonlyNode<K>) => Node<K>Parameters
xReadonlyNode<K>
Return value
Node<K>
Description
Spelled dpdy
on WGSL and dFdy on GLSL ES 3.00.
Examples
Example
import { fn, dpdy, f32T } from 'typeshade'
const dv = fn('dv', { v: f32T }, ({ v }) => dpdy(v))Targets
| Target | Support | Notes |
|---|---|---|
| WGSL (WebGPU) | Supported |
|
| GLSL ES 3.00 (WebGL2) | Supported |
|
| CPU oracle | Stub | The oracle has no texture memory and no neighbouring fragments. The call throws unless the module was compiled with |
In the guide
See also
Source
src/core/ir/node.ts, line 2257, at commit 26de7be8