I have a similar problem with Intel HD Graphics 3000, driver version: 184.108.40.20647
then the multiplication : M*x is valid and the result should be of type vec4, however if I write: vec4 y = M*x then I have the message:
" '=' : cannot convert from '3-component vector of float' to '4-component vector of float'".
It means "mat3x4 * vec3" is considered having the vec3 type : mat3x4*vec3 = vec3 ?!
I do not have this error with Nvidia cards.
Thanks to fix this issue.
In GLSL, the type
mat4x3represents a matrix that is 4 columns wide (row-lengths of 4) and 3 rows tall (column-lengths of 3) [source]. The products of a matrix and a vector in GLSL requires the vector's length be the same as the matrix's column-length/row-count [source].
What you're seeing — that a matrix with column-lengths of 3 requires the vector to be a
vec3— is the correct behavior for GLSL on every platform. It's much more common to use matrices of size
mat4) when transforming the
gl_Position. Correct solutions to your problem would be to:
- Strip off the
.wcomponent off of
gl_Vertexas you've done, or
- To initialize a 4th row of the matrix (as a
0,0,0,1(from bottom-left to bottom-right).
Much more information about how GL/GLSL perform standard matrix transformation can be found in this useful post: http://www.songho.ca/opengl/gl_transform.html#modelview
The best part about this is the two official Intel reps didn't bother to point out your mistake, they both blindly handed you apologies and courtesies claiming that they're sending the problem off to be fixed. TL;DR: Intel has some pretty ****** support reps.
- Strip off the