Skip to main content

Khronos Blog

WebGL 2.0 Achieves Pervasive Support from all Major Web Browsers

One of the great headaches of developing interactive graphics applications for online deployment is covering every base. Your targets likely include a near-infinite combination of browser vendors, browser versions, and graphics hardware. The Khronos Group created WebGL to slice through this Gordian knot, rendering high-performance interactive graphics in any compatible browser, and on any graphics processing unit, without the need for plug-ins. Now, with support for WebGL 2.0 in Safari 15 for both macOS and iOS, we’re happy to report that “compatible browsers” includes pretty much all of them.

When WebGL 2.0 first shipped in 2017, it was a huge step forward in terms of graphics capabilities. WebGL 2.0 delivers the OpenGL ES 3.0 feature set, adding access to key features including transform feedback, instanced rendering, multiple render targets, uniform buffer objects, occlusion queries, and much wider texture support to the original WebGL 1.0 shader-based, programmable graphics pipeline. The specification shipped in Firefox and Chrome at launch, but rolling it out across all WebGL implementers has been a long road. For years, developers have needed a WebGL 1.0 fallback path to reach a significant number of browsers and devices. No more: WebGL 2.0 has fully arrived, and application authors can target it with confidence.

Work began in earnest to bring WebGL 2.0 to Safari in June of 2019. The project has had a number of positive side effects. Apple adopted ANGLE as the basis for Safari’s WebGL implementation, and as a result, their engineering team spent over a year making dramatic contributions to ANGLE’s Metal backend. Safari now runs WebGL on top of Metal on recent iOS and macOS devices. Collaborative work continues among the Apple and Google engineering teams, including adopting top-of-tree ANGLE into WebKit, creating a common codebase for development going forward, and switching Chrome to use ANGLE’s Metal backend as well. Even as WebGL 2.0 achieves pervasiveness, work on this specification is continuing to drive interoperability and consistency forward in other areas.

“This successful collaboration among our engineering teams will elevate and simplify the graphics ecosystem on the web," says Ken Russell of Google, chair of the Khronos WebGL Working Group. "Developers can finally target WebGL 2.0 with full confidence, and we look forward to WebGPU delivering further advances to the web's graphics applications in the near future."

“As an early champion of WebGL, we are overjoyed to see truly broad support of WebGL 2 become a reality,” says Kelsey Gilbert, Mozilla WebGL lead. “It's exciting to have WebGL 2.0 on Firefox for iOS, and we anticipate and look forward to seeing WebGL-2-first development unlock more power, more flexibility, and more efficiencies for applications of all types and for all users.”

“Microsoft Edge is pleased to fully support WebGL 2.0, providing web developers access to the power of the GPU,” said Jatinder Mann, Partner Group Program Manager, Microsoft. “When combined with the simplicity of the open-source rendering framework: Babylon.js, accessing cutting-edge graphics features on Microsoft Edge is as simple as a few lines of javascript.”

Browser-based interactive graphics capabilities are maturing fast – almost as quickly as demand for new capabilities are rising. W3C's WebGPU API is actively being developed in its GPU for the Web Working Group, with browser implementations in progress. Currently a working draft, this API will expose to web browsers the modern computer graphics capabilities provided by Direct3D 12, Metal, and Vulkan.

“W3C is pleased to be working with Khronos and joins them in congratulating implementers for empowering the Web platform with a robust 3D graphics API now available across devices,” says Dominique Hazaël-Massieux, Immersive Web W3C Strategist. “Khronos's work on Vulkan and SPIR-V are key input to the W3C WebGPU API and its accompanying shading language WGSL, set to provide more powerful 3D graphics and computation API for the Web, built on top of modern native GPU capabilities.”

Full rollout of any new specification takes time. WebGL 1.0 was initially released in March 2011, and was fully supported by over 80 percent of browsers in September 2014, three and a half years later. WebGL 2.0 has now reached the same pervasiveness benchmark - over 80% availability - but it took a similar amount of time to get here. The journey from WebGL 1.0 to WebGL 2.0 to WebGPU will continue, even once the WebGPU spec is officially released.

In the meantime, WebGL continues to evolve. We recently announced compressed texture format availability across all browsers - developers have guaranteed access to at least one of ETC2 or S3TC - as well as a new multi-draw extension that can significantly improve performance through geometry batching. We’ve also provided access to OES_draw_buffers_indexed functionality to enable advanced order independent transparency techniques. Finally, we are continuing to work on expanded conformance testing: performance and quality are our highest priorities as a working group.

“The pervasive availability of WebGL 2.0 is a testament to the sustained commitment of the browser vendors, who we congratulate on bringing this significant new functionality to the most widely available and accessible 3D platform ever created: the Web,” said Neil Trevett, vice president developer ecosystems at NVIDIA and Khronos president. “Khronos is committed to the ongoing support of WebGL, and working closely with the W3C and browser vendors to ensure a smooth future transition from WebGL to WebGPU for web developers everywhere.”

We encourage all developers to migrate from WebGL 1.0 to WebGL 2.0 if you haven’t already done so. We also encourage you to participate in the vibrant WebGL online community: you can join the WebGL Dev List for product announcements, demos, questions, discussions and more, or drop into the WebGL Matrix chatroom to talk with browser implementers and other developers. Let us know how you’re using WebGL, and what you’d like to see us do next.