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

[Public WebGL] Weird shader compiler error - casting a mat4 into a mat3.

I have an odd vertex shader compiler error that's happening on just one
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 a
3x3 matrix.   Here is the complete shader source:

    attribute vec3 POSITION ;
    attribute vec3 TEXCOORD0 ;
    uniform mat4 WorldToCamera ;
    uniform mat4 CameraToScreen ;
    varying vec2 texCoord ;

    void main ()
         texCoord.xy = TEXCOORD0.xy ;
         vec3 cameraPos = mat3(WorldToCamera) * POSITION,1.0) ;
         gl_Position = CameraToScreen * vec4 ( cameraPos, 1.0 ) ;

...when I rewrite the code to avoid the cast, it compiles OK.  Aside
from this one little quirk, the system is running Minefield just fine.

I'm running Minefield (latest nightly build) in WinXP on an older nVidia
6100-GO laptop.   I already installed the latest nVidia drivers to avoid
the blacklisting issue. The same code seems to work fine on dozens of
other machines.  Unfortunately, we seem to be being blacklisted under
Chrome right now - so I don't have a comparison point here.

Any clues?

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