WebGPU Implementation Status: A Guide for Developers
Dive into the world of WebGPU, the next-generation graphics API for the web. This article details the current implementation status across various browsers, providing valuable insights for web developers eager to leverage its power. Stay updated on browser compatibility, explore available resources, and begin building cutting-edge web graphics experiences.
What is WebGPU?
WebGPU is a new web API that exposes modern graphics hardware capabilities for advanced rendering and computation. It will eventually replace WebGL as the standard API for browser-based graphics.
Key Advantages of WebGPU:
- Improved Performance: Closer to native hardware performance than WebGL.
- Modern Features: Access to advanced GPU features like compute shaders.
- Cross-Platform: Designed to run on various platforms and devices.
Browser Implementation Status
Here’s a breakdown of WebGPU's implementation status across major browsers:
Chrome and Edge
WebGPU is now available on Mac, Windows, and ChromeOS in Chrome 113 and Edge 113.
- Develop against Chrome Canary or Edge Canary for the latest updates.
- Ongoing efforts include expanding platform support and resolving bugs.
Platform | Status |
---|---|
Android | 121 |
Chrome OS | 113 |
Linux | Flagged |
Mac | 113 |
Windows | 113 |
Note: On Linux, enable the chrome://flags/#enable-unsafe-webgpu
flag and launch the browser with --enable-features=Vulkan
.
Firefox and Servo
Based on the wgpu project in Rust, Firefox and Servo are actively developing WebGPU support. Here are the supported platform-independent features:
- WGSL Shaders (validation, overridable constants, behavioral analysis, uniformity analysis)
- Buffer mapping
- Core Features (render bundles, compute)
- Error handling (error model, error scopes, graceful device lost handling)
- Presentation
Platform-Dependent Features | Vulkan | D3D12 | Metal |
---|---|---|---|
Present Surface Sharing | |||
Bounds Checks | ✔️ | ✔️ (Not Needed) | ✔️ (Missing Vertex Pulling) |
Firefox
WebGPU is enabled by default in Nightly Firefox builds. Track progress via the Graphics: WebGPU component in Bugzilla.
Servo
Implementation is in progress and can be enabled via the dom.webgpu.enabled
preference.
Safari
WebGPU support is under development in Safari Technology Preview. Testable via the "Develop menu" in Safari Technology Preview 185 and later.
WebGPU Resources for Developers
Explore these resources to get started with WebGPU development:
Samples:
- webgpu-samples: For Chrome and Firefox, using WGSL or GLSL via SPIR-V.
- wgpu-rs samples: For Firefox and Chrome, compiled from Rust.
- WebKit/Safari Demos: Uses WSL.
- hello-webgpu-compute.glitch.me: A simple compute demo.
Demos:
- webgpu-clustered-shading
- Meta-balls
- Spookyball - A 3D Breakout game with a Halloween theme.
- WebGPU Playground - A student project from Imperial College London.
Articles:
Frameworks:
- Babylon.js (uses SPIR-V)
- WebGPU documentation
- Performance comparison: WebGL Forest vs WebGPU Forest
Stay Connected
- Mailing List: [email protected] for questions and feedback.
- Matrix Chat: Join the "Web Graphics" community: #webgraphics:matrix.org. The general WebGPU channel is #WebGPU:matrix.org.
By staying informed and utilizing these resources, you'll be well-equipped to explore the exciting potential of WebGPU and create innovative web graphics applications.