Reference for post-processing and compute APIs shared by Svelte/React/Vue adapters and core entrypoints.
Entrypoints
Shared pass options
ShaderPass
Programmable post-process pass.
Required shader contract:
Additional option:
Runtime update API:
BlitPass
Fullscreen texture sample pass with configurable filter ('linear' or 'nearest').
CopyPass
Attempts direct GPU texture copy (copyTextureToTexture) and falls back to blit if conditions are not met.
Direct-copy path requires all of:
clear === falsepreserve === true- source and output are different textures
- neither surface is
canvas - matching dimensions and format
ComputePass
GPU compute pass for single-dispatch workloads.
Required shader contract:
All three elements are validated at construction time: the @compute annotation, @workgroup_size(...), and @builtin(global_invocation_id) parameter.
Options
Runtime update API
ComputeDispatchContext
PingPongComputePass
Iterative compute pass for multi-step GPU simulations.
Options
Runtime update API
Properties
Slot constraints
Compute passes do not participate in slot routing. They have no input, output, or needsSwap options.