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

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



On 24 September 2013 14:37, Ben Adams <thundercat@illyriad.co.uk> wrote:
For IE 11 try not defining more that one variable per line

Change:
   attribute vec2 c, d;

To
   attribute vec2 c;
   attribute vec2 d;

See how that works?

That indeed seems to make IE11 much happier.

Thanks Ben,

Regards,
Tom
 

Kind regards

Ben Adams
@ben_a_adams

On 24 September 2013 13:21, Tom Payne <tom.payne@camptocamp.com> wrote:
Hi,

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?

Cheers,
Tom




-- 
Camptocamp SA
Tom PAYNE
PSE A
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.

Mo

--
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
Tom PAYNE
PSE A
CH-1015 Lausanne

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

--
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.

--
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
Tom PAYNE
PSE A
CH-1015 Lausanne

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