v137 · miscellaneous

WebGPU: GPUTextureView for externalTexture binding

Functionality added to the WebGPU spec after its first shipment in a browser. A GPUTextureView is now allowed to be used for an externalTexture binding when creating a GPUBindGroup.

concepts

  1. External texture view

    external textures (video frames) accept regular GPUTextureView bindings. Lets compute / fragment shaders sample them the same as any other texture.

  2. Effect chain

    A multi-pass effect graph (source → grayscale → threshold → composite) over the same external texture. Demonstrates how the v137 binding unblocks chained passes against one source.

  3. Binding lab

  4. Texture Cache Manager

    A GPU texture cache storing 6 procedurally generated frames. Click any slot to recall it via GPUTextureView in an external-texture binding slot and apply a filter — same pipeline, same bind group layout, no re-compilation. Tracks cache hits and misses.

    Pick a source (HTMLVideoElement, VideoFrame, uploaded RGBA) and an effect; side-by-side code panes show both binding styles, with a capability matrix listing what only the v137 path unlocks.

why it shipped

Some developers using WebGPU for video effects pipelines have proposed allowing a compatible GPUTextureView (2D, single subresource) to be used in place of a GPUExternalTexture binding. This would simplify their shader logic, which currently needs to handle both GPUExternalTexture (for source video) and GPUTextureView (for intermediate processing) and reduce the need to dynamically compile shaders depending on where the texture comes from.

references