Reference for post-processing and compute APIs shared by Svelte/React/Vue adapters and core entrypoints.
Entrypoints
Shared render-pass options
ShaderPass, BlitPass, and CopyPass share these post-scene render-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.
Compute passes are renderer-managed pre-scene workloads. The public extension point is the WGSL source plus dispatch strategy passed to ComputePass or PingPongComputePass.
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, and they always dispatch before the base scene render. Render pass order is preserved only within the post-scene render-pass group.