[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Who maintains http://get.webgl.org?

Hi Will,

Sorry for the delay replying. You're absolutely right, the fragment shader was wrong. Thanks for your pull request fixing it.


P.S. I double-checked the WebGL repo and don't think there are other bogus uses of GL_ES. Some of the shaders ported from the OpenGL ES conformance suite still test that macro, though it's not necessary in WebGL (GL_ES is always defined).

On Tue, Mar 8, 2016 at 1:17 PM, Will Eastcott <will@playcanvas.com> wrote:
I was wondering who maintains http://get.webgl.org/. As you may know, the WebGL community tends to use this site as the starting point to figure out if a device actually supports WebGL. However, it specifies the following fragment shader:

#ifdef GL_ES
precision highp float;
void main() {
  gl_FragColor = vec4(0.4, 0.4, 0.4, 1.0);

If the GPU doesn't support highp (like the Mali 450 MP it would seem), then the page says 'Your browser supports WebGL' but the cube doesn't render and you get the console message:

*** Error compiling shader :ERROR: 0:3: 'highp' : precision is not supported in fragment shader 

The weird thing is, Firefox let's you get away with specifying highp and you see the cube - whereas Chrome fails to compile the shader.

I haven't got a clue who to take this up with. I think the fragment shader on the page is just plain wrong. But maybe there's a Chrome issue here too? Or is Firefox at fault? Any ideas?



Will Eastcott (@willeastcott)
CEO, PlayCanvas Ltd