Archived

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

MtSMox

Projection matrix and upper left corner of near clipping plane

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