WebGPUBackendOptions
Generated TypeScript API reference for the public mcut SDK.
mcut SDK / compositor/src / WebGPUBackendOptions
Interface: WebGPUBackendOptions
Defined in: packages/compositor/src/webgpu/webgpu-backend.ts:41
The WebGPU compositor backend. Image quads (video/image elements)
composite as full-frame passes over a ping-pong texture pair —
importExternalTexture keeps VideoFrames zero-copy — with effects as
WGSL passes and every blend mode in one shader (mode uniform). Raster
content (text, captions, multicam chrome, transitions, custom renderers)
still paints through canvas2d in frame space and uploads as a texture
layer in z-order, so output matches the reference Canvas2D backend.
Lifecycle: WebGPUBackend.create({ canvas, width, height }) once, then
renderFrameWith(backend, project, timeMs, options) per frame, resize
on project dimension changes, dispose when done. For export, pass the
GPUTexture-backed canvas straight to Mediabunny's CanvasSource — no CPU
readback.
Properties
canvas
canvas: HTMLCanvasElement | OffscreenCanvas;Defined in: packages/compositor/src/webgpu/webgpu-backend.ts:43
Presentation canvas; the backend configures its 'webgpu' context.
device?
optional device?: GPUDevice;Defined in: packages/compositor/src/webgpu/webgpu-backend.ts:48
Bring your own device (tests/sharing); otherwise adapter-requested.
height
height: number;Defined in: packages/compositor/src/webgpu/webgpu-backend.ts:46
width
width: number;Defined in: packages/compositor/src/webgpu/webgpu-backend.ts:45
Project (composition) size — passes render at this resolution.