CedricGuillemet / ImGuizmo

Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui
MIT License
3.22k stars 907 forks source link

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

Open troughton opened 3 years ago

troughton commented 3 years ago

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.

m-schuetz commented 3 months ago

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.