What is the difference between WebGPU and WebGL2?
WebGL2 is a JavaScript binding of OpenGL ES 3.0: you get a rendering context on a <canvas>, compile GLSL shaders and issue draw calls against global state. MDN marks it Baseline, widely available across browsers since September 2021.
WebGPU is the successor. MDN describes it as providing better compatibility with modern GPUs, general-purpose GPU computation and access to more advanced GPU features. Shaders are written in WGSL, work is recorded into command buffers and submitted to a queue, and compute pipelines sit next to render pipelines.
| WebGL2 | WebGPU | |
|---|---|---|
| Based on | OpenGL ES 3.0 | Direct3D 12, Metal and Vulkan era APIs |
| Shader language | GLSL ES 3.00 | WGSL |
| Compute shaders | No | Yes, compute pipelines |
| Error model | Synchronous getError() | Asynchronous error scopes |
| Global support (caniuse, Oct 2026) | About 97% | About 87%, plus about 2% partial |
| Secure context required | No | Yes (HTTPS) |
Which browsers support WebGPU today?
Per caniuse (usage data for October 2026): Chrome and Edge from version 113, Opera from 99, Samsung Internet from 24 and Safari on iOS from 26 support WebGPU. Desktop Safari 26 and later has partial support. Firefox still ships it disabled by default, including Firefox for Android. WebGL2 runs on every one of those browsers.
That gap is why a browser game should not require WebGPU. A visitor on Firefox, an older iPhone or a locked-down machine still needs a frame.
Should a browser game use WebGPU or WebGL2?
Pick by what the game needs, not by which API is newer:
- Reach first: WebGL2 alone reaches the most players. It is the right floor for every browser game.
- GPU compute: particle simulation, culling or skinning on the GPU need WebGPU compute pipelines.
- Many draws: WebGPU records work into command buffers, which MDN notes makes rendering individual objects cheaper on the CPU side.
- Both: run WebGPU where available and fall back to WebGL2. This is what most engines aim for, and what Aura3D does by default in its live games.
See both backends on one scene: every live game accepts ?backend=webgl2 to force the fallback.
How does Aura3D run one scene on both backends?
Aura3D has its own renderer with a WebGPU and a WebGL2 backend. You write the scene once against @aura3d/engine; the backend is a renderer option.
import { createAuraApp, looks, model, scene } from "@aura3d/engine";
import { assets } from "./aura-assets";
createAuraApp("#app", {
scene: scene().add(looks.preset("product-studio")).add(model(assets.product)),
renderer: { backend: "auto" },
...looks.appOptions("product-studio")
});
Without a renderer option the engine uses WebGL2. On the live site, a game switched its default to auto only after it rendered correctly on a real GPU and ran at 0.9x of its WebGL2 frame rate or better; games that missed that bar stay on WebGL2 (method and table: upgrade-5.0.0 notes). Those measurements were headless Chrome on one Apple silicon machine and are not a performance claim for other GPUs.
How do I test the WebGL2 fallback?
- Open a live game, for example Aura Slam 3D, and append
?backend=webgl2to the URL. - Compare it with the default URL in a browser that has WebGPU.
- In your own project, read
app.diagnostics()to see which backend and render path ran. - Before you publish, run
npx @aura3d/[email protected] check-deploy --dist dist.
Frequently asked questions
Is WebGPU faster than WebGL2?
Not automatically. WebGPU lowers CPU cost per draw and adds compute, so scenes with many objects or GPU simulation can gain. A simple scene may run the same or slower. Measure your own scene on the devices you target.
Does Safari support WebGPU?
Safari on iOS 26 and later supports WebGPU according to caniuse, and desktop Safari 26 and later has partial support. Earlier Safari versions need the WebGL2 path.
Does Firefox support WebGPU?
Caniuse lists WebGPU as disabled by default in current Firefox releases, on desktop and Android. Firefox players get WebGL2.
Do I have to write my shaders twice?
With raw APIs, yes: GLSL for WebGL2 and WGSL for WebGPU. Aura3D's built-in materials, looks and effects cover both backends; a custom shader for the lower-level rendering package is authored as a paired GLSL and WGSL material.
Can Aura3D force one backend?
Yes. Set renderer: { backend: "webgpu" } or { backend: "webgl2" }. Leaving the option out uses WebGL2; "auto" tries WebGPU first and falls back to WebGL2 on the same canvas.
Is WebGL2 going away?
There is no sign of that. MDN notes no further OpenGL, and so no WebGL, feature updates are planned, but WebGL2 remains Baseline across browsers and is the fallback every WebGPU engine keeps.
Start a scene in one command.
MIT licensed and free. The starter ships a model, lighting and a dev server.