Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XMMatrixPerspectiveFovLH AspectHByW #1

Closed
walbourn opened this issue May 24, 2016 · 2 comments
Closed

XMMatrixPerspectiveFovLH AspectHByW #1

walbourn opened this issue May 24, 2016 · 2 comments
Assignees
Labels

Comments

@walbourn
Copy link
Member

I think the AspectHByW parameter of XMMatrixPerspectiveFovLH should be AspectWByH.

If you look at the math to compute m[0][0] and m[1][1] inside XMMatrixPerspectiveFovLH, you'll see that it's identical to the math used in gluPerspective. However, gluPerspective's aspect parameter is width/height.

How could gluPerspective and XMMatrixPerspectiveFovLH use the same math, but have a different meaning? Futhermore, the results in my app look wrong when I pass height/width, but look correct when I pass width/height.

@walbourn
Copy link
Member Author

You are correct that the aspectRatio should be W / H as documented on MSDN. The name AspectHByW is confusing so it should probably just be changed to AspectRatio

@walbourn
Copy link
Member Author

Fixed for 3.09

@walbourn walbourn self-assigned this Jun 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant