hello, since in GLSL the modelmatrix is not available, i was wondering if it is possible to get it programatically from the gl_ModelViewMatrix and the "viewmatrix" which i would pass as a uniform?
if yes, how?
thank you!
hello, since in GLSL the modelmatrix is not available, i was wondering if it is possible to get it programatically from the gl_ModelViewMatrix and the "viewmatrix" which i would pass as a uniform?
if yes, how?
thank you!
You can obtain the model matrix by multiplying the modelview matrix with the inverse of your view matrix.
gl_ModelViewMatrix * myViewMatrixInverse