Hello Guest

How does GLSL read a matrix?

  • 0 Replies
  • 34 Views
How does GLSL read a matrix?
« on: November 13, 2020, 21:56:26 »
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)
Code: [Select]
projectionMatrix.mat[2][3] =  -(2*Zfar*Znear)/zm;

or

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

???