op.values

A named step that writes this frame's values for the passes after it.

op.values(name: string, run: (f: GridFrame) => void): GridStage

Import sim from shaders/std and use sim.grids.op.values.

Parameters

NameTypeNotes
namestring
run(f: GridFrame) => void

Example

op.values('write', (f) => paramsU.write({dt: f.dt, radius: f.num('radius', 0.4)}))

Tip. Read props here with f.num('prop', fallback) so a prop that is briefly not a number cannot reach the GPU as undefined.

See also

  • op.host — A named step that runs before any gate: pointer smoothing, activity flags, anything a later settle needs to know.
  • op.pass — One GPU pass, the same every frame.

Used by

PixelSort, ReactionDiffusion