How do you access the individual elements of a glsl mat4?
The Section 5.6 of the GLSL reference manual says you can access mat4 array elements using operator[][] style syntax in the following way: mat4 m; m[1] = vec4(2.0); // sets the second column to all 2.0 m[0][0] = 1.0; // sets the upper left element to 1.0 m[2][3] = 2.0; // sets the 4th element … Read more