mrdoob / glsl-sandbox

Shader editor and gallery.
https://glslsandbox.com/
MIT License
1.56k stars 263 forks source link

WebGL 2.0 #47

Open Marqin opened 7 years ago

Marqin commented 7 years ago

It seems that WebGL 2.0 is not supported.

http://glslsandbox.com/e#36446.0 gives:

e:787 ERROR: unsupported shader version

while my browsers support WebGL 2.0 and all samples work fine on them.

charlietsao commented 3 years ago

The reason is here:

gl = canvas.getContext( 'experimental-webgl', { preserveDrawingBuffer: true } );

Here, experimental-webgl implies WebGL 1.0, and should be motified to webgl2 or experimental-webgl2.

Be carful not to break WebGL 1.0 support.