stackgl / shader-school

:mortar_board: A workshopper for GLSL shaders and graphics programming
Other
4.32k stars 254 forks source link

Matrices: Intro-6, * operation between matrix and vector has a mistake #137

Closed SantanMaddi closed 8 years ago

SantanMaddi commented 9 years ago

Multiplication of the vector and matrix (in the same order), result is given as vec2(7, 10) which is wrong and must be changed to vec2(5, 11) - as below vec2 u = vec2(1, 2) * m; //u = vec2(7, 10) instead it must be, vec2 u = vec2(1, 2) * m; //u = vec2(5, 11) The operation executed is dot product.

Similarly, multiplication of the matrix and vector (in the same order) result is given as vec2(5, 8) which is wrong again and must be changed to vec2(7, 10) - as below vec2 v = m * vec2(1, 2); //v = vec2(5, 8) instead it must be, vec2 v = m * vec2(1, 2); //v = vec2(7, 10)

ghost commented 9 years ago

+1

I found now this problem (following the course as student), good to know that you already reported and solved.

Please, merge this fix!

thejmazz commented 9 years ago

+1

Can someone give this a merge? Confused me a bit working through it today.