Closed fabianwulf closed 7 years ago
Hey everyone,
first of all thanks for providing such a great tool to learn GLSL in a very motivational way!
I am fairly new to this subject and stumbled across one confusing bit in exercise intro-6 (matrices) I wanted to sort out for myself by asking:
At the beginning of the exercise you mention that
matrix constructors are in column major order.
Later on there is this code example how to store specific columns of a matrix into a vector like:
mat3 m = mat3(1.1, 2.1, 3.1, 1.2, 2.2, 3.2, 1.3, 2.3, 3.3); //Read out first column of m vec3 a = m[0]; //Now: a = vec3(1.1, 2.1, 3.1);
When storing the first column inside the new vec3 a, wouldn't it's value rather be vec3(1.1, 1.2, 1.3) than vec3(1.1, 2.1, 3.1)?
vec3(1.1, 1.2, 1.3)
vec3(1.1, 2.1, 3.1)
Just wondering.
Best regards, Fabian
Ok, I've had an insightful moment when looking inside the OpenGL wiki and gonna close this "issue" again, so please ignore it. 😅
Cheers!
Hey everyone,
first of all thanks for providing such a great tool to learn GLSL in a very motivational way!
I am fairly new to this subject and stumbled across one confusing bit in exercise intro-6 (matrices) I wanted to sort out for myself by asking:
At the beginning of the exercise you mention that
Later on there is this code example how to store specific columns of a matrix into a vector like:
When storing the first column inside the new vec3 a, wouldn't it's value rather be
vec3(1.1, 1.2, 1.3)
thanvec3(1.1, 2.1, 3.1)
?Just wondering.
Best regards, Fabian