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

ImGuizmo: Support infinite-far-plane reversed-z #210

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

troughton
Copy link

It is possible to create valid projection matrices where the far plane is at infinity, in which case the ray direction will be NaN. We can avoid this by shifting the far plane closer in NDC space.

PathogenDavid added a commit to PathogenDavid/ThreeL that referenced this pull request Jul 24, 2023
Had to fix some minor issues with ImGuizmo not playing nice with left-handed reverse-z infinite-far perspective matrices.
Thanks for Thomas here for saving me the effort of tracking down the ComputeCameraRay issue: CedricGuillemet/ImGuizmo#210
@m-schuetz
Copy link

m-schuetz commented Aug 14, 2024

Thanks for that pointer. This, together with hardcoding gContext.mReversed = true in ComputeContext() made it work for me. I'm also using projection matrix with reverse-z and infinite far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants