[Mesa-dev] glsl2 compiler regression
Kenneth Graunke
kenneth at whitecape.org
Wed Aug 11 11:23:53 PDT 2010
On Wednesday 11 August 2010 10:13:13 Thomas Jones wrote:
> This shader does
not compile with glsl2 and did with the old one
>
> #version 110
> void
main() {
> gl_TexCoord[1] = gl_MultiTexCoord0*2-1;
> gl_Position =
gl_Vertex;
> }
>
> The compiler gives the message:
>
> 0:5(38): error:
Could not implicitly convert operands to arithmetic
> operator 0:5(40):
error: Operands to arithmetic operators must be numeric
>
> If I change the
#version 110 to #version 120 it works
This is correct behavior. GLSL 1.10
explicitly forbids implicit conversions; they were added in 1.20. So you'll
either need to use version 1.20 or do gl_MultiTexCoord0 * 2.0 -
1.0.
--Kenneth
More information about the mesa-dev
mailing list