[GLSL] getting the camera's position.
I think it should be the last column of the inverted view matrix.
The view matrix transforms from world space to camera space. What you're looking to do is to transform 0,0,0 in camera space into world space, so that explains the inversion.
The view matrix transforms from world space to camera space. What you're looking to do is to transform 0,0,0 in camera space into world space, so that explains the inversion.
thnx!
OK this might sound like a realy stupid question but i cant seem to find it googling.
How do i access the data inside a mat4? for example how do i get the element at row 1 column 2?
OK this might sound like a realy stupid question but i cant seem to find it googling.
How do i access the data inside a mat4? for example how do i get the element at row 1 column 2?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement