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

[Public WebGL] Re: [webgl-dev-list] uniform and attribute names


This has just broken our code, although in investigating it, we've discovered some very large differences in browser behaviour on a trivial example:
The code creates a WebGL context and compiles and links a trivial shader.

The fragment and vertex shaders have been minified with glsl-unit [1], and as a result the same name "c" is used for a uniform in the fragment shader and as an attribute in the vertex shader.

The results are:

Chrome 29 (Mac OS X):
success, linking passes

Chrome 31 (Linux):
linking fails with a "Name conflicts between an uniform and an attribute", as expected

IE11 (Windows):
lots of weird compiler errors and inconsistent return values:
fragment shader compile status = true
fragment shader info log = Shader compilation errors
vertex shader compile status = false
vertex shader info log = Shader compilation errors
(0, 0): Internal compiler error
program link status = false
program info log = Shader has not been successfully compiled

Firefox 23 (Mac OS X) and 24 (Linux):
no output whatsoever - nothing, nada, zilch

So, the Chrome behaviour is as expected, but IE11 is broken, and Firefox is just weird.

Does anyone know why Firefox does not seem to run the example at all?


[1] https://code.google.com/p/glsl-unit/

Camptocamp SA
CH-1015 Lausanne

+41 21 619 10 13 (direct)
+41 21 619 10 10 (centrale)
+41 21 619 10 00 (fax)

On 11 September 2013 01:56, Zhenyao Mo <zmo@google.com> wrote:
Dear WebGL developers,

We recently put a check in chromium at program link time, which will
fail the link if a uniform and an attribute share the same name.

This is because both attributes and uniforms are considered having
global namespace.  This behavior has been confirmed by OpenGL ES
working group, therefore WebGL should enforce this restriction.

If your WebGL app suddenly fail to work with the recent chrome canary,
check your program link error message. This might be the cause.


You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-list+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Camptocamp SA
CH-1015 Lausanne

+41 21 619 10 13 (direct)
+41 21 619 10 10 (centrale)
+41 21 619 10 00 (fax)