129

I'd like to be able to use WebGL-based sites like Shadertoy, WebGL Earth, etc…

But those sites tell me that WebGL is disabled in my browser.

How can I enable WebGL so I can view these sites?

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
TachyonVortex
  • 1,516
  • 3
  • 11
  • 12

3 Answers3

221

I've made this answer a community wiki post, so please update it if you notice any out-of-date or missing information.


Browser support for WebGL

Check caniuse.com/webgl to see whether your browser supports WebGL.


Enabling WebGL

If your browser supports WebGL, follow these instructions to enable it:

Chrome

First, enable hardware acceleration:

  • Go to chrome://settings
  • Click the Advanced ▼ button at the bottom of the page
  • In the System section, ensure the Use hardware acceleration when available checkbox is checked (you'll need to relaunch Chrome for any changes to take effect)

Then enable WebGL:

  • Go to chrome://flags
  • Ensure that Disable WebGL is not activated (you'll need to relaunch Chrome for any changes to take effect)
  • In newer versions, this option of Disable WebGL will not be available, you will instead have to search for WebGL 2.0 (or some different version) that looks like this:

    enter image description here

    Here you will have to change Default to Enabled in the drop down.

  • [Try this if above doesn't work] Enable - Override software rendering list

Then inspect the status of WebGL:

  • Go to chrome://gpu
  • Inspect the WebGL item in the Graphics Feature Status list. The status will be one of the following:
    • Hardware accelerated — WebGL is enabled and hardware-accelerated (running on the graphics card).
    • Software only, hardware acceleration unavailable — WebGL is enabled, but running in software. See here for more info: "For software rendering of WebGL, Chrome uses SwiftShader, a software GL rasterizer."
    • Unavailable — WebGL is not available in hardware or software.

If the status is not "Hardware accelerated", then the Problems Detected list (below the the Graphics Feature Status list) may explain why hardware acceleration is unavailable.

If your graphics card/drivers are blacklisted, you can override the blacklist. Warning: this is not recommended! (see blacklists note below). To override the blacklist:

  • Go to chrome://flags
  • Activate the Override software rendering list setting (you'll need to relaunch Chrome for any changes to take effect)

For more information, see: Chrome Help: WebGL and 3D graphics.

Firefox

First, enable WebGL:

  • Go to about:config
  • Search for webgl.disabled
  • Ensure that its value is false (any changes take effect immediately without relaunching Firefox)

Then inspect the status of WebGL:

  • Go to about:support
  • Inspect the WebGL Renderer row in the Graphics table:
    • If the status contains a graphics card manufacturer, model and driver (eg: "NVIDIA Corporation -- NVIDIA GeForce GT 650M OpenGL Engine"), then WebGL is enabled.
    • If the status is something like "Blocked for your graphics card because of unresolved driver issues" or "Blocked for your graphics driver version", then your graphics card/driver is blacklisted.

If your graphics card/drivers are blacklisted, you can override the blacklist. Warning: this is not recommended! (see blacklists note below). To override the blacklist:

  • Go to about:config
  • Search for webgl.force-enabled
  • Set it to true

(Like Chrome, Firefox has a Use hardware acceleration when available checkbox, in Preferences > Advanced > General > Browsing. However, unlike Chrome, Firefox does not require this checkbox to be checked for WebGL to work.)

Safari

  • Go to Safari's Preferences
  • Select the Advanced tab
  • Ensure that the Show Develop menu in menu bar checkbox is checked
  • In Safari's Develop menu, select Experimental Features sub-menu and ensure that WebGL 2.0 is checked

Notes

Upgrading graphics drivers

If your graphics drivers are too old to support WebGL, you may be able to upgrade them.

More information is available here:

Blacklists

Certain graphics cards and drivers are blacklisted by some browsers, because they are known to contain serious bugs or cause crashes. In very severe cases, these can even cause the entire computer to freeze! For example, this issue causes certain Mac computers to freeze and require restarting.

Many browsers have an option to override the blacklist (ie: attempt to use the blacklisted features, despite the risks). This is not recommended! You should only override the blacklist if you understand and accept the risks.

More information is available here:

Cristy
  • 361
  • 1
  • 8
  • 26
TachyonVortex
  • 1,516
  • 3
  • 11
  • 12
  • 4
    For Firefox, on Ubuntu, I also had to reset `gfx.crash-guard.status.glcontext` (See from https://sourceforge.net/p/x3dom/mailman/message/34731616/). I prefer to post as a comment before any edit to this community answer. – ThomasG77 Apr 12 '16 at 22:18
  • Well I have the most up-to-date version of Chrome (Version 57.0.2987.133 (64-bit)). But at the chrome://flags I changed "WebGL 2.0...Allow web applications to access WebGL 2.0" to enabled, there was one for "WebGL Draft Extensions" I left that alone. Yet still in chrome://gpu both versions are still unavailable, You mention video drivers, how would I know if mine supports it or not? I have an Intel NUC DCCP847DYE – Edward Apr 10 '17 at 22:51
  • Just tried going to http://www.webglearth.com/ on kubuntu 16.04. It worked fine without any changes in Firefox 54 and Vivaldi 1.10. ... Things do continue to get better. – Joe Jul 11 '17 at 06:05
  • Strange, in Firefox 56 (currently a nightly version) WebGL doesn't work even though it's all showing up OK as above. Hm. – mlissner Jul 26 '17 at 15:39
  • Seem that the `webgl.*` Firefox [options](http://getadmx.com/?Category=FrontMotion&Policy=FrontMotion.Policies.Firefox::WEBGL_WEBGL2_COMPAT_MODE) are very poorly documented. What do they all mean? [Here](https://www.sitepoint.com/firefox-enable-webgl-blacklisted-graphics-card/) are some additional options to look at. – not2qubit Nov 05 '17 at 02:00
  • Amazing answer! Almost like a wiki page – asgs Jan 07 '18 at 16:52
  • This needs updating - the main problem is that Chrome, Firefox, etc have Google's broken ANGLE hack enabled (this disables OpenGL even when OGL is enabled, and tries to replace it with crappy D3D commands. That doesn't work). Don't touch webgl - it's on by default - just disable ANGLE – Adam Mar 04 '18 at 14:09
  • NB: I can't provide a correct answer myself, because someone locked the post, so we're blocked from adding answers. Shrug. – Adam Mar 04 '18 at 14:10
  • i just signed up in this community to upvote your answer , thank you ! – amdev Sep 08 '18 at 08:22
  • I'm on Ubuntu 18.04 with an Nvidia card and the latest drivers, it gives me "WebGL creation failed: * tryNativeGL * Exhausted GL driver options" whenever my HTC Vive is plugged in, but works fine when it's unplugged. – Aaron Franke Sep 19 '19 at 04:02
  • For Edge, go to `edge://settings/system` and enable "Use hardware acceleration when available". Restart the browser. Then go to `edge://gpu/` and verify that WebGL, WebGL2, and WebGPU show "Hardware accelerated". No changes are necessary in `edge://flags/`. – Russell G Jun 29 '23 at 14:28
1

Very useful for Chrome - except that it might be best to clarify the Disable WebGL option - which is not obvious in Chrome.

The Disable WebGL option has to have been disabled (urgh - double negative), i.e. the link below must say 'Enable' - meaning that disabling webGL is off... May save someone a few minutes.

Best wishes Andy

AndyS
  • 384
  • 2
  • 6
0

Since none of the above worked (perhaps the screenshots are old now) thought I should list the latest ones here. (Note that I'm using Version 115.0.5790.170 (Official Build) (arm64) on Mac M1, aka Apple Silicon)

  1. In Chrome, Goto URL: chrome://settings/?search=hardware+ That should do two things. First take you to settings, and filter the hardware acceleration parameter by searching for it.

Goto settings, search for the word "hardware"

  1. Switch off (flick the "Use hardware acceleration when available" button to left. Usually when this is enabled, it is flicked to the right and in blue colour. When flicked to the left it becomes grey as in the above screenshot, and that means that now the hardware acceleration is disabled.
SydMK
  • 111
  • 3