I want to get inverse of perspective projection matrix.
But inverse member function of the matrix is not working as i thought.
look up my source please.
from kivy.graphics.transformation import Matrix
aspect = screen.width / screen.height
projMat = Matrix()
projMat.perspective(30., aspect, 1.0, 1000.0)
print projMat
invProjMat = projMat.inverse()
print invProjMat
Then this is result.
[[ 3.327745 0.000000 0.000000 0.000000 ]
[ 0.000000 3.732051 0.000000 0.000000 ]
[ 0.000000 0.000000 -1.002002 -2.002002 ]
[ 0.000000 0.000000 -1.000000 0.000000 ]]
[[ 0.300504 -0.000000 -0.000000 0.000000 ]
[ -0.000000 0.267949 0.000000 0.000000 ]
[ -0.000000 0.000000 -0.998002 0.000000 ]
[ -0.000000 -0.000000 -0.998002 1.000000 ]]
Above second matrix is inversed matrix of first matrix.
But It looks like wrong matrix.
AB isn't Identity Matrix
How can i get correct inverse matrix of perspective projection matrix?
Help me please.