PDA

View Full Version : glsl mat constructor (row majoror column major)



marshats
09-19-2010, 08:16 PM
Given a declaration in the shader as



mat2 M = mat2(vec2(1.0,2.0),
vec2(3.0,4.0) );
vec2 P = M*vec2(5.0,6.0);


How is the matrix filled in ie is it row major so


P=|1 2||5|
|3 4||6|

or is it column major


P=|1 3||5|
|2 4||6|

ZbuffeR
09-19-2010, 11:19 PM
Column major.