Blue's Clues: How to enable WebGL in Internet Explorer 11

Last week, web developer Francois Remy published an initial analysis of Internet Explorer 11 -- the next version of IE that surfaced via a leaked copy of Windows "Blue". In his analysis, he noted that he found references to various WebGL APIs but ultimately wrote them off as non-functional.

Picking up where Remy left off, I dug a little deeper and discovered WebGL support is indeed incomplete but is coming and can be enabled for experimentation. (Paul Thurrott has the background on why Microsoft has been hesitant to adopt this technology to date.)

Yep, that's Internet Explorer 11 with WebGL code running!

Yep, that's Internet Explorer 11 with WebGL code running!

To enable WebGL, just execute the registry script below and restart Internet Explorer 11. You may also want to ensure you install the latest vendor-provided display drivers. (Inbox drivers don't typically provide much in the way of OpenGL support.)

Update 3/31: Remy has discovered that the FEATURE_WEBGL_HLSL_SHADERS flag actually instructs IE 11 to use IESL vs. the more standard OpenGL GLSL. If you leave that at zero, you'll run in a configuration that more closely matches what's out there today. I edited the script below to reflect this.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl]

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_WEBGL]

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_WEBGL_HLSL_SHADERS]

To reproduce the blue WebGL screenshot above, cut/paste this sample code into an .html file and display it in IE 11.

<body onload="demo()">
<canvas style="height: 100%; width: 100%" id='webgl' />

var gl = {};
function demo()
  var canvas = document.getElementById("webgl");
    gl = canvas.getContext("experimental-webgl");
  } catch(e) { }

  if (gl) {
    gl.clearColor(0, 0.678, 0.937, 1.0);