op.gradient

A derived output: the grid's slope at every cell as a 2D vector, ready for displaceBy.

op.gradient(): GradientOp

Import op from shaders/std and use op.gradient.

Example

derive: {displacement: op.gradient()}

See also

  • displaceBy — Push the child's pixels around by a vector field from one of your simulations.

Used by

CursorRipples