op.cache

A GPU pass chosen per frame, for a pass whose input is rebound after the frame starts.

op.cache(step: (f: GridFrame) => ComputeStep): GridStage

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

Parameters

NameTypeNotes
step(f: GridFrame) => ComputeStep

Example

op.cache(() => lumaPipeline)

See also

  • op.readyWhen — Run nothing until fn returns true, typically once the child's picture has arrived through bindInputs.
  • op.pass — One GPU pass, the same every frame.

Used by

PixelSort