Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Compare WebGPU and WebGL2

Learn about the differences and similarities between these graphics APIs.
Read time 1 minuteLast updated 18 days ago

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 shaders and indirect rendering.

High-Level comparison

Feature

WebGL2

WebGPU

Support statusDefault API, widely accepted by most browsers.Limited browser and device support.
API basisBased on OpenGL ES 3.0 functionality.Unlocks more modern graphics features.
Shader codeRequires explicit GLSL precision qualifiers (
highp
,
mediump
,
lowp
).
Strict uniformity analysis required, no HLSL extended features.
Compute ShadersNot natively supported.Supported with limitations (No
RWBuffer
, no async compute).
GPU readbackSynchronous readback APIs generally function.No synchronous readback (must use
AsyncGPUReadback
).
Storage texturesStandard WebGL 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