|Original author(s)||Mozilla Foundation|
|Developer(s)||Khronos WebGL Working Group|
|Initial release||March 3, 2011|
2.0 / June 29, 2023
Shaders in WebGL are written in GLSL and passed to the WebGL API as text strings. The WebGL implementation compiles these strings to GPU code. This code is executed for each vertex sent through the API and for each pixel rasterized to the screen.
WebGL evolved out of the Canvas 3D experiments started by Vladimir Vukićević at Mozilla. Vukićević first demonstrated a Canvas 3D prototype in 2006. By the end of 2007, both Mozilla and Opera had made their own separate implementations.
In early 2009, the non-profit technology consortium Khronos Group started the WebGL Working Group, with initial participation from Apple, Google, Mozilla, Opera, and others. Version 1.0 of the WebGL specification was released March 2011. As of March 2012, the chair of the working group is Ken Russell.
An early application of WebGL was Zygote Body. In November 2012 Autodesk announced that they ported most of their applications to the cloud running on local WebGL clients. These applications included Fusion 360 and AutoCAD 360.
Development of the WebGL 2 specification started in 2013 and finished in January 2017. The specification is based on OpenGL ES 3.0. First implementations are in Firefox 51, Chrome 56 and Opera 43.
Almost Native Graphics Layer Engine
Almost Native Graphics Layer Engine (ANGLE) is an open source graphic engine which implements WebGL 1.0 (2.0 which closely conforms to ES 3.0) and OpenGL ES 2.0 and 3.0 standards. It is a default backend for both Google Chrome and Mozilla Firefox on Windows platforms and works by translating WebGL and OpenGL calls to available platform-specific APIs. ANGLE currently provides access to OpenGL ES 2.0 and 3.0 to desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11 APIs. ″[Google] Chrome uses ANGLE for all graphics rendering on Windows, including the accelerated Canvas2D implementation and the Native Client sandbox environment.″
WebGL is widely supported by modern browsers. However, its availability depends on other factors, too, like whether the GPU supports it. The official WebGL website offers a simple test page. More detailed information (like what renderer the browser uses, and what extensions are available) can be found at third-party websites.
- Google Chrome – WebGL 1.0 has been enabled on all platforms that have a capable graphics card with updated drivers since version 9, released in February 2011. By default on Windows, Chrome uses the ANGLE (Almost Native Graphics Layer Engine) renderer to translate OpenGL ES to Direct X 9.0c or 11.0, which have better driver support. However, on Linux and Mac OS X, the default renderer is OpenGL. It is also possible to force OpenGL as the renderer on Windows. Since September 2013, Chrome also has a newer Direct3D 11 renderer, which requires a newer graphics card. Chrome 56+ supports WebGL 2.0.
- Firefox – WebGL 1.0 has been enabled on all platforms that have a capable graphics card with updated drivers since version 4.0. Since 2013 Firefox also uses DirectX on the Windows platform via ANGLE. Firefox 51+ supports WebGL 2.0.
- Safari – Safari 6.0 and newer versions installed on OS X Mountain Lion, Mac OS X Lion and Safari 5.1 on Mac OS X Snow Leopard implemented support for WebGL 1.0, which was disabled by default before Safari 8.0. Safari version 12 (available in MacOS Mojave) has available support for WebGL 2.0 as an "Experimental" feature. Safari 15 enables WebGL 2.0 for all users.
- Opera – WebGL 1.0 has been implemented in Opera 11 and 12, but was disabled by default in 2014. Opera 43+ supports WebGL 2.0.
- Internet Explorer – WebGL 1.0 is partially supported in Internet Explorer 11. Internet Explorer initially failed most of the official WebGL conformance tests, but Microsoft later released several updates. The latest 0.94 WebGL engine currently passes ~97% of Khronos tests. WebGL support can also be manually added to earlier versions of Internet Explorer using third-party plugins such as IEWebGL.
- Microsoft Edge – For Microsoft Edge Legacy, the initial stable release supports WebGL version 0.95 (context name: "experimental-webgl") with an open source GLSL to HLSL transpiler. Version 10240+ supports WebGL 1.0 as prefixed. Latest Chromium-based Edge supports WebGL 2.0.
- Android Browser – WebGL 1.0 is supported on Android as of Chrome 25. WebGL 2.0 is supported on Android as of Chrome 114. Chrome is used for the Android system webview as of Android 5.
- BlackBerry 10 – WebGL 1.0 is available for BlackBerry devices since OS version 10.00
- BlackBerry PlayBook – WebGL 1.0 is available via WebWorks and browser in PlayBook OS 2.00
- Internet Explorer – Prefixed WebGL 1.0 is available on Windows Phone 8.x (11+)
- Firefox for mobile – WebGL 1.0 is available for Android and MeeGo devices since Firefox 4.
- Firefox OS
- Google Chrome – WebGL 1.0 is available for Android devices since Google Chrome 25 and enabled by default since version 30.
- Maemo – In Nokia N900, WebGL 1.0 is available in the stock microB browser from the PR1.2 firmware update onwards.
- MeeGo – WebGL 1.0 is unsupported in the stock browser "Web." However, it is available through Firefox.
- Microsoft Edge – Prefixed WebGL 1.0 is available on Windows 10 Mobile.
- Opera Mobile – Opera Mobile 12 supports WebGL 1.0 (on Android only).
- Safari on iOS – WebGL 1.0 is available for mobile Safari in iOS 8. WebGL 2.0 is available for mobile Safari in iOS 15.
- Sailfish OS – WebGL 1.0 is supported in the default Sailfish browser.
- Tizen – WebGL 1.0 is supported
Tools and ecosystem
There has been an emergence of 2D and 3D game engines for WebGL, such as Unreal Engine 4 and Unity. The Stage3D/Flash-based Away3D high-level library also has a port to WebGL via TypeScript. A more light-weight utility library that provides just the vector and matrix math utilities for shaders is sylvester.js. It is sometimes used in conjunction with a WebGL specific extension called glUtils.js.
As with any other graphics API, creating content for WebGL scenes requires using a 3D content creation tool and exporting the scene to a format that is readable by the viewer or helper library. Desktop 3D authoring software such as Blender, Autodesk Maya or SimLab Composer can be used for this purpose. In particular, Blend4Web allows a WebGL scene to be authored entirely in Blender and exported to a browser with a single click, even as a standalone web page. There are also some WebGL-specific software such as CopperCube and the online WebGL-based editor Clara.io. Online platforms such as Sketchfab and Clara.io allow users to directly upload their 3D models and display them using a hosted WebGL viewer.
Starting from Firefox Version 27, Mozilla has given Firefox built-in WebGL tools that allow the editing of vertices and fragment shaders. A number of other debugging and profiling tools have also emerged.
- List of WebGL frameworks
- Experience Curiosity – WebGL simulation of the Mars rover Curiosity
- glTF – originally known as WebGL Transmissions Format or WebGL TF
- Java OpenGL – OpenGL library for the Java programming language
- "Khronos Releases Final WebGL 1.0 Specification". 3 March 2011. Retrieved 2015-05-18.
- "WebGL Fundamentals". HTML5 Rocks.
- Parisi, Tony (2012-08-15). "WebGL: Up and Running". O'Reilly Media, Incorporated. Archived from the original on 2013-02-01. Retrieved 2012-07-13.
- "WebGL – OpenGL ES 2.0 for the Web". Khronos.org. Retrieved 2011-05-14.
- "WebGL 2.0 Achieves Pervasive Support from all Major Web Browsers". The Khronos Group. 2022-02-09. Retrieved 2022-02-13.
- "WebGL Specification". Khronos.org. Retrieved 2011-05-14.
- "WebGL 2.0 Specification". Khronos.org. Retrieved 2017-02-27.
- "Canvas 3D: GL power, web-style". Blog.vlad1.com. Archived from the original on 2011-07-17. Retrieved 2011-05-14.
- "Taking the canvas to another dimension". My.opera.com. 2007-11-26. Archived from the original on 2007-11-17. Retrieved 2011-05-14.
- "Khronos Details WebGL Initiative to Bring Hardware-Accelerated 3D Graphics to the Internet". Khronos.org. 2009-08-04. Archived from the original on 2012-04-19. Retrieved 2011-05-14.
- "Google Body – Google Labs". Bodybrowser.googlelabs.com. Archived from the original on 2011-05-13. Retrieved 2011-05-14.
- Bhanoo, Sindya N. (2010-12-23). "New From Google: The Body Browser". Well.blogs.nytimes.com. Retrieved 2011-05-14.
- "AUTODESK FUSION 360: THE FUTURE OF CAD, PT. 1". 3dcadworld.com. Retrieved 2013-08-21.
- "WebGL 2 Specification". khronos.org. 2013-09-26. Retrieved 2013-10-28.
- "WebGL 2.0 Specification".
- "WebGL - Web APIs". MDN.
- "ANGLE - Almost Native Graphics Layer Engine". 2019. Retrieved June 21, 2019.
- "WebGL test page". webgl.org.
- "WebGL Report". webglreport.com.
- "WebGL Browser Report — WebGL Detection — WebGL Tester — BrowserLeaks". browserleaks.com.
- Mah, Paul (February 8, 2011). "Google releases Chrome 9; comes with Google Instant, WebGL – FierceCIO:TechWatch". FierceCIO. Archived from the original on 2011-10-25. Retrieved 2012-03-20.
- "WebGL in Chrome Stable! - Learning WebGL". learningwebgl.com. Archived from the original on 2015-05-28. Retrieved 2014-08-07.
- "(WebGL) How to Enable Native OpenGL in your Browser (Windows)". geeks3d.com.
- "Chromium Blog: Introducing the ANGLE Project". Chromium Blog.
- "WebGL around the net, 17 Oct 2013 - Learning WebGL". learningwebgl.com. Archived from the original on 8 August 2014. Retrieved 5 August 2014.
- "At last! Chrome D3D11 day has come!". tojicode.com.
- "Mozilla Firefox 4 Release Notes". Mozilla.com. 2011-03-22. Retrieved 2012-03-20.
- "New in OS X Lion: Safari 5.1 brings WebGL, Do Not Track and more". Fairerplatform.com. 2011-05-03. Archived from the original on 2012-03-19. Retrieved 2012-03-20.
- "Enable WebGL in Safari". Ikriz.nl. 2011-08-23. Archived from the original on 2012-03-04. Retrieved 2012-03-20.
- "Getting a WebGL Implementation". Khronos.org. 2012-01-13. Retrieved 2012-03-20.
- "Implementations/WebKit". Khronos.org. 2011-09-03. Retrieved 2012-03-20.
- "WebGL Now Available in WebKit Nightlies". Webkit.org. Archived from the original on 2012-03-08. Retrieved 2012-03-20.
- modeless (2021-09-24). "Safari 15 is released. WebGL 2 is now supported in every major browser and platform!". r/webgl. Retrieved 2023-10-18.
- "WebGL and Hardware Acceleration". My.opera.com. 2011-02-28. Archived from the original on 2011-03-03. Retrieved 2012-03-20.
- "Introducing Opera 12 alpha". My.opera.com. 2011-10-13. Archived from the original on 2011-10-15. Retrieved 2012-03-20.
- "WebGL (Windows)". microsoft.com. Microsoft.
- "Internet Explorer 11 Preview guide for developers". Microsoft. 2013-07-17. Retrieved 2013-07-24.
- "WebGL". Microsoft. 2013-07-17. Retrieved 2013-07-24.
- "Internet Explorer 11 to support WebGL and MPEG Dash". Engadget. 2013-06-26. Retrieved 2013-06-26.
- "IE11 fails more than half tests in official WebGL conformance test suite". Microsoft Connect.
- "IEWebGL". Iewebgl. Retrieved 2014-08-14.
- "GitHub - Microsoft Edge WebGL Implementation". Microsoft. 2016-06-04. Retrieved 2016-06-10.
- "WebGL: 2D and 3D graphics for the web - Web APIs - MDN". Retrieved 2023-06-28.
- "WebGL 2.0 - Can I use..." Retrieved 2023-06-28.
- McDonough, Larry. "WebGL: 3D Gaming on the Web Arrives". BerryReview. Archived from the original on 2013-04-13. Retrieved 2013-04-09.
- Halevy, Ronen. "PlayBook OS 2.0 Developer Beta Includes WebGL, Flash 11, & AIR 3.0". BerryReview. Retrieved 2011-11-15.
- "WebGL on Mobile Devices". iChemLabs. 2011-11-12. Archived from the original on 2013-01-27. Retrieved 2011-11-25.
- "Mobile HTML5 compatibility on iPhone, Android, Windows Phone, BlackBerry, Firefox OS and other mobile devices". Retrieved 2015-09-16.
- Kersey, Jason. "Chrome Beta for Android Update". Chrome Releases Blog. Retrieved 2013-08-23.
- Voipio, Riku (2010-06-07). "WebGL on N900". Suihkulokki.blogspot.com. Retrieved 2011-05-14.
- "Dev guide: WebGL – Microsoft Edge Development". Microsoft. Retrieved 2016-06-10.
- "Opera Mobile 12". Opera Software. Archived from the original on 1 March 2012. Retrieved 27 February 2012.
- Cunningham, Andrew (2014-09-17). "iOS 8, Thoroughly Reviewed". Ars Technica. Retrieved 2014-09-19.
- "HTML5test – How well does your browser support HTML5?". Retrieved 2015-09-16.
- "HTML5test – How well does your browser support HTML5?". Retrieved 2015-09-16.
- Parisi, Tony (13 February 2014). Programming 3D Applications with HTML5 and WebGL: 3D Animation and Visualization for Web Pages. "O'Reilly Media, Inc.". pp. 364–366. ISBN 978-1-4493-6395-6.
- Barrett, Stephen. "Tegra K1 Lands in Acer's Newest Chromebook". anandtech.com.
- "Blog > Away3D Typescript 4.1 Alpha > Away3D". away3d.com. Archived from the original on 2014-08-08. Retrieved 2014-08-05.
- Boreskov, Alexey; Shikin, Evgeniy (2014). Computer Graphics: From Pixels to Programmable Graphics Hardware. CRC Press. p. 370. ISBN 978-1-4398-6730-3.
- Anyuru, Andreas (2012). Professional WebGL Programming: Developing 3D Graphics for the Web. John Wiley & Sons. p. 140. ISBN 978-1-119-94059-3.
- Fulton, Steve; Fulton, Jeff (2013). HTML5 Canvas (2nd ed.). "O'Reilly Media, Inc.". p. 624. ISBN 978-1-4493-3588-5.
- "The WebGL potential - TypedArray.org". typedarray.org.
- "Blend4Web Official Site - About". Blend4Web.com. Retrieved 2015-06-22.
- "Live editing WebGL shaders with Firefox Developer Tools". Mozilla Hacks – the Web developer blog.
- "Real-Time Rendering · WebGL Debugging and Profiling Tools". realtimerendering.com.