stage.cache

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

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

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

Parameters

NameTypeNotes
step(f: GridFrame) => ComputeStep

Example

stage.cache(() => lumaPipeline)

See also

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

Used by

PixelSort