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
| Name | Type | Notes |
|---|---|---|
name | string | |
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 asundefined.
See also
op.host— A named step that runs before any gate: pointer smoothing, activity flags, anything a latersettleneeds to know.op.pass— One GPU pass, the same every frame.