Jump to content
  • Advertisement


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


Projection matrix and upper left corner of near clipping plane

This topic is 6029 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

Hi, If I set the projection matrix using this: D3DXMatrixPerspectiveFovLH( &matrix, D3DX_PI / 4, 4.0f / 3.0f, 1.0f, 100.0f ); DXTEST( g_Device->SetTransform( D3DTS_PROJECTION, &matrix ) ); What would be the coordinate of the upper left corner of the near clipping plane? I thought because this is a angle of 45 degrees and a near clipping plane at 1.0 this would be (4/3, 1.0, 1.0), but it''s more something like (4/3 * 0.5, 0.5, 1). Is the angle devided in 2? Or has the projection matrix nothing to do with this? Thanks, Mox

Share this post

Link to post
Share on other sites
Did some looking around and some testing with my code and found the following.

( tanf(fowy/2) * aspect, tanf(fowy/2), 1 )

I also read something in the SDK, but there they used cosine and that didn''t work...

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!