Adds a compute pass optimized for atomic operations (e.g., histograms, particle counters).
Optionaldeps: string[]Connects an audio plugin to synchronize uniforms with audio data.
Adds WGSL code that will be prepended to all subsequent pass shaders. Useful for shared structs and constants.
Adds a GPGPU compute pass.
Used to reference this pass result in others.
Compute shader code. Use '##WORKGROUP_SIZE' for auto-optimization.
Optional size for a storage buffer (array
Optionaldeps: string[]List of pass names to read from.
Adds a full-screen fragment pass. This automatically manages two textures for feedback loops (ping-ponging).
Name of the texture variable in WGSL.
Fragment shader code.
Optionaldeps: string[]List of pass names to read from.
Attaches a sequencer to the engine to drive sceneId, progress, and flags.
Loads an image into a global texture accessible by all passes.
Name of the variable in WGSL (e.g., 'var tex: texture_2d
URL or image element source.
The final output pass that renders to the canvas. Calling this triggers the shader compilation process.
Final fragment shader code.
Optionaldeps: string[]Pass names to be sampled in the final output.
Starts the render loop.
Optionaltimer: WebGPUTimingOptional WebGPUTiming plugin for profiling.
configures the global uniform layout.
Optionalcallback: (layout: UniformLayout) => voidUse this to add custom uniforms via layout.add().
StaticcreateInitializes the WebGPU context and creates a TinyShade instance.
The ID of the HTML canvas element.
TinyShade: A minimal, high-performance WebGPU framework for multi-pass fragment and compute shaders.