On Tue, Mar 15, 2011 at 5:47 AM, <firstname.lastname@example.org
>> On Sun, Mar 13, 2011 at 10:50 PM, Benoit Jacob <email@example.com
>>> ----- Original Message -----
>>>> I have an odd vertex shader compiler error that's happening on just
>>>> of my machines.
>>>> The shader is utterly minimal (it renders a sky box) - and the error
>>>> message is cryptic:
>>>> error C0201: unsupported version 120
>>>> ...the problem appears to be that I'm trying to cast a 4x4 matrix into
>>>> 3x3 matrix.
>>> It seems that GLSL ES 1.0 doesn't have a mat3(mat4) constructor, as far
>>> as I can see. Either this warning is telling you that you need to add
>>> '#version 120' at the beginning of your shader, or it's telling you that
>>> your GPU driver doesn't support version 120 on this GPU. It can be
>>> interesting to check with webgl.shader_validator=false, which disables
>>> ANGLE validation/translation, to see if the warning is coming from ANGLE
>>> or straight from the driver.
>> The issue is actually that GLSL 1.10 (for the desktop) reserved the
>> matrix constructor calls taking matrix as argument. They were exposed
>> for the first time in GLSL 1.20. ANGLE's GLSL shader translator emits
>> the #version 120 directive if it encounters a matrix/matrix
>> constructor call, so the issue is that your hardware doesn't support
>> GLSL 1.20. You should be able to rewrite your shader to avoid this
>> constructor call which will be problematic on some older desktop
> It's worrying that something as seemingly simple as a cast could be
> something that WebGL developers have to be careful about...although it's
> no problem at all to restructure the shader to fix the problem.
> What's worrying is that I've been testing pretty widely and I thought I'd
> ironed out all of the portability wrinkles.
> I guess we should clarify the limitations of the oldest version of GLSL
> that is supported. Almost everyone should be writing against that minimal
> spec. We also need to find some way to test against that set of
> restrictions without having every WebGL developer having to own an entire
> antique computer collection.