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

Re: [Public WebGL] loop constants

On 01/29/2011 10:13 PM, John Davis wrote:
> Hit this link with Firefox 4.0b10, it'll throw an error in the shader
> validator about the loop index being compared to a non-constant.
> In Google Chrome 9 beta, the spinning cube with the multi-octave
> texture looks great.
> http://www.pcprogramming.com
> JD

It runs in the latest FireFox nightly build under Linux too - but the
point here is NOT that there is a problem when your shader fails to
compile.  The bug is when it DOES work.

It SHOULDN'T work...it's supposed to fail.



...appendix A, section 4...the conditional part of a loop has to have
the form:

            loop_index relational_operator constant_expression

...so your non-constant loops are illegal in OpenGL ES 2.0 - and hence
illegal in WebGL.

The bug is in your code - and in the browser/OS combos that fail to
detect that error.

   -- Steve

You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl