diff --git a/renderdoc/driver/d3d11/d3d11_replay.cpp b/renderdoc/driver/d3d11/d3d11_replay.cpp index 2c0cf57ba..d17769718 100644 --- a/renderdoc/driver/d3d11/d3d11_replay.cpp +++ b/renderdoc/driver/d3d11/d3d11_replay.cpp @@ -2891,6 +2891,9 @@ uint32_t D3D11Replay::PickVertex(uint32_t eventId, int32_t width, int32_t height if(cfg.ortho) guessProj = Matrix4f::Orthographic(cfg.position.nearPlane, cfg.position.farPlane); + if(cfg.position.flipY) + guessProj[5] *= -1.0f; + pickMVPProj = projMat.Mul(camMat.Mul(guessProj.Inverse())); } diff --git a/renderdoc/driver/d3d12/d3d12_replay.cpp b/renderdoc/driver/d3d12/d3d12_replay.cpp index ba152a7c9..600be3fab 100644 --- a/renderdoc/driver/d3d12/d3d12_replay.cpp +++ b/renderdoc/driver/d3d12/d3d12_replay.cpp @@ -1762,6 +1762,9 @@ uint32_t D3D12Replay::PickVertex(uint32_t eventId, int32_t width, int32_t height if(cfg.ortho) guessProj = Matrix4f::Orthographic(cfg.position.nearPlane, cfg.position.farPlane); + if(cfg.position.flipY) + guessProj[5] *= -1.0f; + pickMVPProj = projMat.Mul(camMat.Mul(guessProj.Inverse())); } diff --git a/renderdoc/driver/gl/gl_debug.cpp b/renderdoc/driver/gl/gl_debug.cpp index 845b309e1..739944dbc 100644 --- a/renderdoc/driver/gl/gl_debug.cpp +++ b/renderdoc/driver/gl/gl_debug.cpp @@ -2210,6 +2210,9 @@ uint32_t GLReplay::PickVertex(uint32_t eventId, int32_t width, int32_t height, if(cfg.ortho) guessProj = Matrix4f::Orthographic(cfg.position.nearPlane, cfg.position.farPlane); + if(cfg.position.flipY) + guessProj[5] *= -1.0f; + pickMVPProj = projMat.Mul(camMat.Mul(guessProj.Inverse())); } diff --git a/renderdoc/driver/vulkan/vk_debug.cpp b/renderdoc/driver/vulkan/vk_debug.cpp index 2a709f6f0..1efe99388 100644 --- a/renderdoc/driver/vulkan/vk_debug.cpp +++ b/renderdoc/driver/vulkan/vk_debug.cpp @@ -1028,6 +1028,9 @@ uint32_t VulkanReplay::PickVertex(uint32_t eventId, int32_t w, int32_t h, const if(cfg.ortho) guessProj = Matrix4f::Orthographic(cfg.position.nearPlane, cfg.position.farPlane); + if(cfg.position.flipY) + guessProj[5] *= -1.0f; + pickMVPProj = projMat.Mul(camMat.Mul(guessProj.Inverse())); }