Inputs

Inputs: what the engine computes for a component before its WGSL body runs. A blurred copy of the layer inside, the layer's own last frame, an extra pass at half resolution, a simulation, a particle field. List them in the definition's inputs and read each by name in WGSL: soft(uv), last(uv), field.slope(uv).

import {child} from 'shaders/std'

Types

TypeWhat it is
ChildSourceThe layer inside this one, as a source for an input (blur(child, …)).
InputBuildContextWhat an input builder gets: the component's context and ways to reach its sources.
InputBuilderThe function that builds an input on the GPU.
InputInstanceOne built input: its named outputs ('' is the default) and its per-frame GPU work.
InputNodeAn input node: plain data plus its builder.
InputReadKindHow a body reads an output: uv samples it smoothly at a position (soft(uv)), texel reads the one texel under a position exactly, unblended (values that must not mix across a boundary, like a nearest point or an index), index reads slot i of a list (clicks(i)).
InputSourceWhat an input can read: the child, an image/video/layer prop, or another input.
InputTextureA texture an input produced or reads, as a TypeGPU texture created with sampled usage.
ScalarArgA scalar argument: a number or a prop reference, read live each frame.

Words

Keep reading