In OpenGL, a matrix takes up multiple locations in a shader (one for each column). So when using a matrix in a vertex shader as an input it is necessary to call glVertexAttribPointer() multiple times.
I am wondering if it is possible to do something similar for matrix types as outputs in a fragment shader when rendering to multiple framebuffers. That is, I would have 4 different textures in a frame buffer bound to color attachments 0 through 3, and then I could have a layout(location = 0) out matrix4 out_mat that I could write to with the fragment shader.
Am I correct in assuming that this would work?
out0 = m[0];out1 = m[1];...