The WebGL JavaScript API exposes hardware-accelerated 3D graphics to the web. Chrome 56 brings support for WebGL 2.0, a major upgrade to the API which unlocks a variety of new graphics features and advanced rendering techniques. WebGL 2.0 is currently available for Chrome users with modern graphics hardware on Windows, macOS, and Linux, and is coming soon to Android.

WebGL 1.0 first launched in Chrome 6 years ago and gave web developers the ability to create immersive plugin-free graphics experiences, from remixing World Cup plays in real-time to visualizing a rock climbing route in a news article. WebGL 2.0 makes it even easier to build 3D web applications, with faster real-time rendering, new types of textures and shaders, and reduced video memory consumption. Techniques including deferred shading, tone mapping, volumetric effects, and particle effects can now be efficiently implemented. The new APIs also bring WebGL up to feature parity with OpenGL ES 3.0, a graphics platform commonly used in mobile games.

In addition to new rendering capabilities, WebGL 2.0 also introduces a substantially expanded conformance test suite with over 340,000 test cases to help ensure that different web browsers offer compatible graphics platforms. Chrome passes 100% of these test cases across multiple GPU vendors on every desktop platform, ensuring that its WebGL 2.0 implementation is stable and consistent.

To get started using WebGL 2.0, check out the WebGL 2.0 Samples Pack, which contains small self-contained examples of most new API features. You can also see WebGL 2.0 in action in After the Flood1, an interactive demo by PlayCanvas, created in conjunction with Mozilla. Finally, check back here for more news about future graphics features, such as OpenGL ES 3.1 support and explorations into a lower-level web graphics API supporting the new explicit graphics interfaces like Vulkan, Metal, and DirectX 12.

Posted by Zhenyao Mo, Software Engineer

[1] If this demo or other WebGL 2.0 content doesn’t run on your machine, you may need to update your graphics hardware or driver.