-
Notifications
You must be signed in to change notification settings - Fork 54
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
orthoOffCenter #5
Comments
The matrix I use now (which I think makes more sense, but is very different from the original): tx = -(right + left) / (right - left); 2.0 / (right - left), 0.0, 0.0, 0.0 |
|
right hand also have some problem. I think It should be like this.
|
The row 3 and col 3 of orthoRH matrix should be 1.0/(zNear-zFar)
|
The orthoOffCenter matrices are either more clever than I can grasp or they are a little broken. They multiply y with zNear but not x - it should be either both or none. Also, they apply the x/y-translations in the addend which is multiplied with z, but for that to work correctly they should set w to z to cancel out the multplication with z.
Changing those, the orthoOffCenterLH matrix looks like this:
2.0_zNear/(right-left), 0.0, 0.0, 0.0,
0.0, 2.0_zNear/(top-bottom), 0.0, 0.0,
-1.0-2.0_left/(right-left), 1.0+2.0_top/(bottom-top), 1.0/(zFar-zNear), 1.0,
0.0, 0.0, zNear/(zNear-zFar), 0.0
The text was updated successfully, but these errors were encountered: