Jump to content
  • Advertisement
Sign in to follow this  
dzzunga

Elliptical Sphere

This topic is 4202 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!