Sign in to follow this  

Elliptical Sphere

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

Hello everybody, I render my sphere mesh with view setting Aspect = 1.0f as below : D3DXMATRIXA16 matProj; D3DXMatrixPerspectiveFovLH( &matProj, D3DX_PI/4, 1.0f, 1.0f, 1000.0f ); but the sphere looks like an ellipse. When i change the Aspect to 1.5f D3DXMatrixPerspectiveFovLH( &matProj, D3DX_PI/4, 1.5f, 1.0f, 1000.0f ); then sphere looks like sphere. I dont understand what's wrong, please tell me why. Thanks you very much

Share this post


Link to post
Share on other sites
The third parameter of D3DXMatrixPerspectiveFovLH is the aspect ratio of your window (or full screen display). If the display area of your window is square, then this aspect is 1. If it, say, 640x480, then this ratio is 640/480, or 4/3. If you don't specify the correct ratio, objects will be stretched in one dimension.

Share this post


Link to post
Share on other sites
Thank you very much, you are so kind.
Not only my sphere mesh but also other meshes look as real things.
Thank ET3D again.

Share this post


Link to post
Share on other sites

This topic is 3868 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.

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