View Full Version : GLSL bug?

Ares Lagae
11-08-2011, 06:15 AM
Is this a GLSL bug, or am I missing something?

gl_FragColor = vec4(mat2(1.0));
=> compiles and works fine

float f = 1.0;
gl_FragColor = vec4(mat2(f));
=> error C1035: assignment of incompatible types (2nd line)


Ares Lagae
11-09-2011, 01:53 PM

Alfonse Reinheart
11-09-2011, 02:19 PM
No, those should not be different. But you didn't tell us what drivers, GPU, etc you were running.

Plus, I'd say that the `vec4(mat2)` conversion is sufficiently rarely used that implementations don't regularly test for it. Try to stay away from areas that are off the beaten path.