Permalink
Browse files

Merge pull request #41 from 983/master

enabled GL_OES_standard_derivatives to get fwidth, dFdx, dFdy
  • Loading branch information...
2 parents 1438407 + 11afa26 commit c89367a0cb78fb225816535df8cb1c36319e1dfb @mrdoob committed Jan 2, 2016
Showing with 6 additions and 1 deletion.
  1. +5 −0 static/index.html
  2. +1 −1 static/js/helpers.js
View
5 static/index.html 100644 → 100755
@@ -65,6 +65,8 @@
<script id="example" type="x-shader/x-fragment">precision mediump float;
+#extension GL_OES_standard_derivatives : enable
+
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
@@ -296,6 +298,9 @@
alert("WebGL not supported, but code will be shown.");
} else {
+
+ // enable dFdx, dFdy, fwidth
+ gl.getExtension('OES_standard_derivatives');
// Create vertex buffer (2 triangles)
View
2 static/js/helpers.js 100644 → 100755
@@ -29,7 +29,7 @@ function load_url_code() {
} else {
- readURL( '5d00000100860200000000000000381c88cdaf8125d4569ed1e6e6c09c2fe72b7d489ad9d27ce026c849f505dd720ff335d10a9aae020d6c5ae383c1b48113253ebdf2f3ce134f3820f3c0c51fbc05ad011e6760c37538ef2510e11f33cb7080000de4c452d3fc136ece677b67088acbd792a9b5ce5df0c751f3b4524f01d0d87382a85e78d7c74a94532bf2216c7659751c13f005aa3d330478c93ec81671986980aa7fe7a7b9972d62db986e6a7786ea36ae9d56eb16d980a18602322ed6531c3174e62dc3d3ada99b0b48be05ce9e0b5dc31c6d8baf62ed660490bf621322abf89d13028ed7794077b5a072711d7aed1cb7d89d92a1a81866aad6582ae8930795aa5c0a31646d43343ed71bb6fce5230efd39c66e' );
+ readURL( '5d00000100b70200000000000000381c88cdaf8125d4569ed1e6e6c09c2fe72b7d489ad9d27ce026c1d90b38e6a986e7c482f98001c7d016ca8db7da32debe67fc602659f4e96ae150d75ea26ae8e8f4056e0b845d0814a2acee3a47ec45af66fb0405385eaedd50db968497c1cbbd79f0634d5534182b2093986dae5ac7e840eb137f39f5b27efbb488f4e85faa6f4c942182673e75dca44f7ffbd8c25c5a2763cb750b9b4e14b9fd5c15ca81ed7ef88a4f77a114cd2d7f675b6a05b467bd164f4058dd3250e6fcdc9d7c195dccdc63b304e1f8c7aaccb1edb7992aa1341e96aa6e8b1ca044e70207be752de1b41e4e07843ab895b2a1995b97085afff70f5eff9d2b630a4c5e43e7ce6f977616d57c97935342e48d0ee9ad3462804ae5608b6872b9749632bf8514fea3ebf9d64b10deb3ff041395050deffbf038e3' );
}
}

0 comments on commit c89367a

Please sign in to comment.