Version: Unity 6.6 Alpha (6000.6)
Language : English
WebGPU Device Filter features and limits
Audio in Web

Compare WebGPU and WebGL2

Compare the functions, limitations, and similarities between the WebGPU and WebGL2 Web graphics APIs.

When building for the Web platform in Unity, you can choose between two graphics APIs: WebGL2 and WebGPU. This page outlines the differences in support, features, and technical limitations between the two options.

WebGL2

WebGL2 is the default graphics API and is compatible with most devices and browsers, but lacks more modern features that WebGPU provides.

WebGPU

WebGPU is a modern graphics API that enables features such as compute shadersA program that runs on the GPU. More info
See in Glossary
and indirect rendering. However, WebGPU is experimental and not recommended for production usage.

High-Level comparison

Feature WebGL2 WebGPU
Support status Default API, widely accepted by most browsers. Limited browser and device support.
API basis Based on OpenGL ES 3.0 functionality. Unlocks more modern graphics features.
Shader code Requires explicit GLSL precision qualifiers (highp, mediump, lowp). Strict uniformity analysis required, no HLSL extended features.
Compute Shaders Not natively supported. Supported with limitations (No RWBuffer, no async compute).
GPU readback Synchronous readback APIs generally function. No synchronous readback (must use AsyncGPUReadback).
Storage textures Standard WebGLA JavaScript API that renders 2D and 3D graphics in a web browser. The Unity Web build option allows Unity to publish content as JavaScript programs which use HTML5 technologies and the WebGL rendering API to run Unity content in a web browser. More info
See in Glossary
texture handling.
Restrictive formats (for example, RGBA8 and RHalf aren’t supported for read-write).

Refer to WebGL2 and WebGPU graphics API for full features and limitations of each graphics API.

Additional resources

WebGPU Device Filter features and limits
Audio in Web