ImGuizmo: Support infinite-far-plane reversed-z#210
Open
troughton wants to merge 1 commit intoCedricGuillemet:masterfrom
Open
ImGuizmo: Support infinite-far-plane reversed-z#210troughton wants to merge 1 commit intoCedricGuillemet:masterfrom
troughton wants to merge 1 commit intoCedricGuillemet:masterfrom
Conversation
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
|
Thanks for that pointer. This, together with hardcoding |
|
I had to do the same, the reverse detection doesn't work. For reference, here's my proj matrix (Vulkan): As a side note, with fp32 Z, today there's really no reason to use any other projection matrix than this. It achieves great distribution over the numeric range, and far planes are effectively obsolete. And even fits in a float4... you don't need a full matmul. |
hrydgard
added a commit
to hrydgard/ImGuizmo
that referenced
this pull request
Dec 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.