<<< GLSL Efficiency | Index | GLSL variable types - matrices >>> |
GLSL indexing for vector and matrix component selection
mat4 myMatrix = mat4(1.0); foo.x = foo[2]; // same as foo.x = foo.z; foo = myMatrix[0]; // first column of matrix foo.x = myMatrix[0][0]; // first column, first row
<<< GLSL Efficiency | Index | GLSL variable types - matrices >>> |