WebGPU
| WebGPU | |
|---|---|
| Information | |
| Type | Graphics and compute API |
| Industry | Web, computer graphics |
| Developer | W3C GPU for the Web Working Group |
| Written In | WebGPU Shading Language (WGSL) |
| Operating System | Cross-platform (Windows, macOS, ChromeOS, Android, Linux, iOS, iPadOS, visionOS) |
| License | W3C standard (royalty-free) |
| Supported Devices | Devices with Vulkan, Metal, or Direct3D 12 capable GPUs |
| Release Date | April 6, 2023 (Chrome 113) |
| Website | https://www.w3.org/TR/webgpu/ |
WebGPU is a web standard and JavaScript API that exposes the graphics and general-purpose compute capabilities of a system's GPU to web pages and web applications. It is developed by the World Wide Web Consortium (W3C) GPU for the Web Working Group, with the API defined in the WebGPU specification and its companion shading language defined in the WebGPU Shading Language (WGSL) specification.[1] WebGPU is designed to map efficiently onto modern native GPU APIs, specifically Vulkan, Apple's Metal, and Microsoft's Direct3D 12, and it is intended to supersede WebGL as the primary low-level graphics API on the web.[2]
Unlike WebGL, which derives from the older OpenGL ES family, WebGPU was designed around the architecture of GPUs built after 2014 and the explicit native APIs that target them. The W3C specification notes that WebGPU "is not related to WebGL and does not explicitly target OpenGL ES."[1] In addition to rendering, WebGPU provides first-class support for compute shaders, which allow general-purpose data-parallel computation on the GPU. This makes it relevant to graphics, games, simulation, and machine learning workloads running in the browser.[2]
For virtual reality and augmented reality on the web, WebGPU matters because it is the rendering layer being connected to WebXR through the WebXR/WebGPU Binding, an in-progress module from the W3C Immersive Web group that lets immersive sessions render with WebGPU instead of WebGL.[3]
History
The effort that became WebGPU began in early 2017. On February 7, 2017, Apple's WebKit team proposed creating a W3C community group to design a new low-level web graphics API and published a proof of concept under the name "WebGPU," based on concepts from Apple's Metal API.[4][5] The W3C "GPU for the Web" Community Group launched on February 16, 2017. At that point Apple, Google, and Mozilla each had experiments in the area; to avoid confusion between Apple's specific proposal and the group's broader goal, Apple's original proposal was renamed "WebMetal" on April 5, 2017, and the WebGPU name was adopted as the working name for the future standard.[5][6]
Google's Chrome team announced its intent to implement WebGPU on June 1, 2018.[5] After several years of design work, Chrome 113 enabled WebGPU by default in April 2023, the first stable shipping implementation. The Chrome team described the result as offering "greatly reduced JavaScript workload for the same graphics and more than three times improvements in machine learning model inferences" compared with WebGL.[2] The specification credited contributions from Mozilla, Apple, Intel, and Microsoft alongside Google during the standardization process.[2]
WebGPU reached broad browser availability over 2025. Apple added WebGPU to Safari 26, announced at WWDC 2025 in June 2025 and shipped that autumn.[7] Mozilla shipped WebGPU on Windows in Firefox 141, released July 22, 2025, with macOS, Linux, and Android support planned to follow.[8][9]
Release timeline
| Date | Milestone |
|---|---|
| 2017-02-07 | Apple's WebKit team proposes a W3C community group and a "WebGPU" proof of concept based on Metal[4] |
| 2017-02-16 | W3C GPU for the Web Community Group launches[5] |
| 2017-04-05 | Apple's original proposal renamed "WebMetal"; WebGPU becomes the group's working name[5] |
| 2018-06-01 | Google Chrome team announces intent to implement WebGPU[5] |
| 2023-04-06 | Chrome 113 and Microsoft Edge ship WebGPU on Windows (Direct3D 12), ChromeOS (Vulkan), and macOS (Metal)[2][5] |
| 2024 | Chrome adds WebGPU on Android 12 and newer (Chrome 121)[10] |
| 2025-07-22 | Firefox 141 ships WebGPU on Windows[9] |
| 2025 (autumn) | Safari 26 ships WebGPU on macOS, iOS, iPadOS, and visionOS[7] |
How it works
A WebGPU application first requests a Template:Code, which represents a physical GPU and its driver, then obtains a Template:Code from it. Work is recorded into command encoders and submitted to a device queue. Rendering uses render pipelines that bind vertex and fragment shaders, while computation uses compute pipelines that run compute shaders. Resources such as buffers, textures, and samplers are grouped into bind groups for binding to a pipeline.[11]
Shaders are written in the WebGPU Shading Language (WGSL), a dedicated shading language standardized alongside the API. WGSL has a syntax described as similar to Rust; it was initially designed for straightforward translation to and from SPIR-V before moving to a more conventional shading-language design.[5][11] Browser engines translate WGSL to the shading language of the underlying native backend at runtime.
WebGPU does not talk to hardware directly. Browsers implement it on top of native GPU APIs through a translation layer. The two main implementations are Dawn, a C++ library used by Chrome, Edge, and other Chromium-based browsers, and wgpu, a Rust library used by Firefox, the Servo engine, and the Deno runtime.[12] The following table summarizes the native backends each platform uses.
| Platform | Native backend |
|---|---|
| Windows | Direct3D 12[2] |
| macOS, iOS, iPadOS, visionOS | Metal[7] |
| ChromeOS, Linux, Android | Vulkan[2][9] |
Comparison with WebGL
WebGL is a binding of OpenGL ES to JavaScript and inherits the design assumptions of that older API. WebGPU was designed to match the architecture of modern GPUs and the explicit native APIs (Vulkan, Direct3D 12, Metal) that drive them, which reduces driver overhead and the amount of JavaScript needed to issue the same amount of rendering work.[2][11] WebGPU also adds compute shaders for general-purpose GPU computation, which WebGL lacks, and allows a single device to output to as many canvases as needed, whereas WebGL can only create one context per canvas.[2][13]
Adoption has been eased by graphics engines that abstract over both APIs. The Three.js library provides a Template:Code that runs on WebGPU and falls back to WebGL where WebGPU is unavailable, and Babylon.js has shipped WebGPU support since version 5.0 in May 2022, with its core engine shaders later rewritten in native WGSL in 2024.[14]
Virtual and augmented reality
WebGPU is connected to browser-based VR and AR through WebXR, the web API for immersive sessions. WebXR was originally built to render with WebGL, and the WebXR/WebGPU Binding is a module under development in the W3C Immersive Web group that lets a WebXR session present frames rendered with WebGPU instead.[3] The motivation given in the binding's explainer is performance: WebGPU "better matches both GPU hardware architecture and the modern native APIs that interface with them, such as Vulkan, Direct3D 12, and Metal," which the group expects to allow more efficient rendering of demanding immersive content than WebGL.[3]
In the binding, WebGPU resources used by WebXR are supplied by an Template:Code object, which is created from a WebGPU-compatible Template:Code and a Template:Code. The Template:Code must be requested with the Template:Code option set to true so that the browser returns an adapter compatible with the active XR device; this mirrors the Template:Code argument already used for WebGL contexts, and using a non-compatible adapter raises an exception. The binding defines compositor layer types including projection layers (Template:Code), quad, cylinder, equirectangular, and cube layers, with only projection layers required and the others gated behind the "layers" feature.[3]
The binding is experimental as of mid-2026. Brandon Jones of Google, a WebXR specification editor, demonstrated WebGPU rendering inside WebXR in March 2025 using Chrome Canary, where it is gated behind the "WebXR Projection Layers" and "WebXR/WebGPU Bindings" flags introduced around Chrome version 135. In that work only the projection layer was implemented, and Jones cautioned that WebGPU "bindings with WebXR are not necessarily expected to be an automatic performance win vs. WebGL at this point," partly because at least one internal texture copy that the group wants to eliminate still occurs.[15]
Apple's implementation is relevant to headset VR/AR because WebGPU in Safari 26 spans visionOS, the operating system of the Apple Vision Pro. The WebKit team stated that "WebGPU supersedes WebGL on macOS, iOS, iPadOS, and visionOS and is preferred for new sites," explicitly naming visionOS among the platforms.[7] Apple has also been an active participant in the WebXR/WebGPU binding work.[3]
Beyond rendering, WebGPU's compute shaders are usable for the GPU-heavy tasks that immersive web applications rely on, such as physics, particle systems, image processing, and on-device machine learning inference, all without leaving the browser.[2][11]
Current status
As of mid-2026, WebGPU is a W3C Candidate Recommendation; the specification carried a Candidate Recommendation Draft date of June 15, 2026, with editors Kai Ninomiya and Brandon Jones of Google and Jim Blandy of Mozilla.[1] WebGPU ships by default in Chrome and Edge across Windows, macOS, ChromeOS, and recent Android, in Safari 26 across Apple platforms including visionOS, and in Firefox on Windows, with Firefox support for macOS, Linux, and Android in progress.[10][5][7][9] The WebXR/WebGPU Binding that brings WebGPU to immersive web sessions remains an in-development module rather than a shipped feature.[3]
References
- ↑ 1.0 1.1 1.2 "WebGPU". 2026-06-15. https://www.w3.org/TR/webgpu/.
- ↑ 2.00 2.01 2.02 2.03 2.04 2.05 2.06 2.07 2.08 2.09 "Chrome ships WebGPU". 2023-04-06. https://developer.chrome.com/blog/webgpu-release.
- ↑ 3.0 3.1 3.2 3.3 3.4 3.5 "WebXR-WebGPU Binding Explainer". https://github.com/immersive-web/WebXR-WebGPU-Binding/blob/main/explainer.md.
- ↑ 4.0 4.1 "Apple's WebKit Team Proposes W3C Community Group to Strive for More Powerful Graphics on the Web". 2017-02-07. https://www.macrumors.com/2017/02/07/apple-webkit-community-metal-on-the-web/.
- ↑ 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 "WebGPU". https://en.wikipedia.org/wiki/WebGPU.
- ↑ "GPU for the Web Community Group". https://www.w3.org/community/gpu/.
- ↑ 7.0 7.1 7.2 7.3 7.4 "WebKit Features in Safari 26.0". 2025-09-15. https://webkit.org/blog/17333/webkit-features-in-safari-26-0/.
- ↑ "Shipping WebGPU on Windows in Firefox 141". 2025-07-15. https://mozillagfx.wordpress.com/2025/07/15/shipping-webgpu-on-windows-in-firefox-141/.
- ↑ 9.0 9.1 9.2 9.3 "Firefox 141 release notes for developers". https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/141.
- ↑ 10.0 10.1 "Overview of WebGPU". https://developer.chrome.com/docs/web-platform/webgpu/overview.
- ↑ 11.0 11.1 11.2 11.3 "WebGPU API". https://developer.mozilla.org/en-US/docs/Web/API/WebGPU_API.
- ↑ "WebGPU". https://webgpu.org/.
- ↑ "From WebGL to WebGPU". https://developer.chrome.com/docs/web-platform/webgpu/from-webgl-to-webgpu.
- ↑ "WebGPU Status". https://doc.babylonjs.com/setup/support/webGPU/webGPUStatus.
- ↑ "Experimenting with WebGPU in WebXR". 2025-03-03. https://toji.dev/2025/03/03/experimenting-with-webgpu-in-webxr.html.