WebGPU video effects are typically 2x to 3x faster than WebGL for work such as virtual backgrounds and in-browser AI inference. WebGPU is now supported by default in every major browser, which makes it a realistic target for WebRTC apps that still rely on WebGL or WASM. The catch is that the speedup requires rewriting WebGL-era pipelines or moving to libraries that use WebGPU natively.
Why WebGPU is faster than WebGL
WebGL works as one large state machine. Every buffer, shader program and setting is bound through a context object, and each change forces a validity check that often means CPU and GPU talking to each other. WebGPU builds and validates a pipeline once, then sends buffers and frames down it asynchronously. That mirrors native APIs such as Direct3D, Metal and Vulkan, so less is lost in translation.
Compute is the second difference. WebGL was built for rendering, so general computing means encoding data as images and rewriting math as image operations. Operations like softmax, used in transformer networks, are hard to express that way, which is why libraries such as WebLLM only run on WebGPU.
The third is memory. WebGPU’s importExternalTexture method brings a VideoFrame from a MediaStream straight in as a texture with no extra copy. WebGL’s texSubImage2D makes a copy in GPU memory, and that overhead shows up in benchmarks.

How shaders work
A GPU runs specialized programs called shaders across hundreds or thousands of parallel threads. Multiplying two arrays element by element is the classic example: each thread handles one index, so the whole operation happens at once. Almost every consumer device has a GPU, whether integrated graphics, Apple silicon or a discrete card, and WebGPU gives browser code a handle to that actual hardware. That is also why WebGPU video effects can use the same device-level control that native apps have.

WASM and WebNN compared
WASM runs on the CPU, on a single thread by default. For small inputs it can beat WebGPU, because moving data to the GPU isn’t worth the overhead. For heavy parallel work, like matrix multiplication or converting every pixel of a 4K image to grayscale, WebGPU wins.
WebNN targets NPUs, the neural chips in Apple Silicon laptops, NVIDIA RTX Spark laptops and most phones. NPUs can often run models up to 3x faster than graphics cards. But WebNN isn’t generally available, even as an origin trial, as of November 2026. It mostly handles compute, takes input from CPU arrays and doesn’t plug cleanly into video or graphics pipelines. It also doesn’t let you choose a device: you state a preference and the browser decides.
In a test running MediaPipe’s selfie model for virtual backgrounds on an M4 MacBook Pro, the rough ranking was WebNN, then WebGPU, then WASM, then WebGL. The implementation mattered as much as the API, and the f16 versus f32 gap in WebNN came from the NPU handling one and the GPU the other. Results will differ by device and model.

Libraries that already use WebGPU
- LiteRT, Google’s successor to TFLite, runs the same models with typically 2x to 3x better performance. It ran the selfie model 2.5x faster than MediaPipe’s own tasks-vision library on the same MacBook.
- Longpipe, an open-source SDK for virtual backgrounds, noise removal and touch-up, runs several features from a single neural network and uses optical flow to cut per-frame inference. With MediaPipe’s wide-format selfie model, WebGPU reached 379 fps against 127 fps on WebGL.
- Dawn, Google’s native WebGPU implementation, runs the same shaders on a server through an npm package over Vulkan, Metal or Direct3D.
- Three.js has also moved to WebGPU.
Dawn has limits. VideoFrame and Canvas objects aren’t available, so each side of a pipeline needs CPU readbacks, and the server needs a GPU or integrated graphics.
Why this matters for video calls
Virtual backgrounds, face effects and noise removal run on every frame of a call, so small per-frame savings add up on laptops and phones. Libraries like MediaPipe have long run these models in WASM or WebGL. With WebGPU now available everywhere, WebGPU video effects are the obvious upgrade path, especially for products that process video on both client and server.
What developers should do next
Most teams won’t write shaders. The practical step is to check whether your effects library has a WebGPU path, and to swap in one that does. Teams that want to go deeper can start with WebGPUFundamentals. Benchmark on your own devices before committing, and watch WebNN as it moves toward wider availability.
Source: webrtcHacks