You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
I think the
AspectHByW
parameter ofXMMatrixPerspectiveFovLH
should beAspectWByH
.If you look at the math to compute
m[0][0]
andm[1][1]
insideXMMatrixPerspectiveFovLH
, you'll see that it's identical to the math used ingluPerspective
. However,gluPerspective
'saspect
parameter iswidth/height
.How could
gluPerspective
andXMMatrixPerspectiveFovLH
use the same math, but have a different meaning? Futhermore, the results in my app look wrong when I passheight/width
, but look correct when I passwidth/height
.The text was updated successfully, but these errors were encountered: