• Advertisement


This topic is now archived and is closed to further replies.

Verifying projection matrix from D3D

This topic is 5786 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am looking the at the D3d 8 sdk documentation for calculating the matrix using D3DXMatrixPerspectiveFovLH. I believe there is an documentation error. Please verify This is the formula from the docs in D3DXMatrixPerspectiveFovLH h = cos(fov/2) / sin(fov/2); w = h / aspect; 2*zn/w 0 0 0 0 2*zn/h 0 0 0 0 zf/(zf-zn) 1 0 0 zn*zf/(zn-zf) 0 The matrix from the function seems to use a different formula (below). h = cos(fov/2) / sin(fov/2) aspect*h 0 0 0 0 h 0 0 0 0 zf/(zf-zn) 1 0 0 zn*zf/(zn-zf) 0 So, is there a documentation error or am I going bonkers (again)??

Share this post

Link to post
Share on other sites

  • Advertisement