How does GLSL read a matrix?

Started by Mihai_Ionut_Floares, November 13, 2020, 21:56:26

Previous topic - Next topic

Mihai_Ionut_Floares

Let's say I have a projection matrix:


GLSL thinks -(2*Zfar*Znear)/zm is at position in matrix 2x3 or at 3x2?
Should I set in my float[][](2D array)
projectionMatrix.mat[2][3] =  -(2*Zfar*Znear)/zm;


or

projectionMatrix.mat[3][2] =  -(2*Zfar*Znear)/zm;


???