Sign in to follow this  
DrGUI

Off-centre projection matrix

Recommended Posts

DrGUI    402
I do not really understand how to use the D3DX helper function to make such a matrix. I had a look at and compared the matrix equations (in the DirectX docs), but could not work out how to use it. I am only young, so have not formally done matrix math; I taught myself. It would help me greatly if someone would tell me how to get identical behaviour from: ProjectionMatrix(width, height...) and ProjectionMatrixOffCentre(left, right, top, bottom...) Thanks!

Share this post


Link to post
Share on other sites
Nik02    4348
You could multiply the projection matrix with another matrices, like scaling and translation (in the case of off-centerness).

You could also tinker with the matrix values directly - to scale something uniformly, multiply the upper-left 3x3 part by some constant scalar. If translation is needed, the last row is responsible for that as a 4d vector (last column, if OpenGL style matrix interpretation is used).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this