An Early Look at WebGL 2

One of the common requests we’ve had since we started work to bring high-end gaming to the Web is the desire to take advantage of the more modern 3D graphics capabilities present in desktop GPUs, as well as the latest generation of mobile GPUs. WebGL, the Web’s standard for 3D graphics, is tied closely to OpenGL ES, the standard for mobile 3D graphics. WebGL 1.0 was based upon OpenGL ES 2.0, which ensured that WebGL content could run on the widest possible hardware, both desktop and mobile.

Today, we’re introducing a preview of WebGL 2, which is still under development by the WebGL working group. WebGL 2 is based on OpenGL ES 3.0, and brings with it many improvements and additions to help developers create stunning visuals on the Web. WebGL 2 will raise many restrictions and add new capabilities compared to WebGL 1. For example, while WebGL 1 only required support for being able to render using 8 textures at a time, WebGL 2 raises this minimum limit to 32.

WebGL 2 also includes requirements for higher precision in fragment shaders, adds support for features such as occlusion queries and geometry instancing, and introduces developer-controlled access to antialiasing, multiple render targets, and more. All of this combines to enable Web developers access to more advanced graphics on both desktop and mobile platforms.

The Unity 5 engine includes experimental support for WebGL export, and we’ve worked with Unity engineers to bring their ES 3.0 target to WebGL 2. Check out Unity’s Teleporter demo below, taking advantage of new WebGL 2 rendering features!