mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-29 02:41:08 +00:00
Account for inverse viewport height when picking vertices
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
|
||||
|
||||
@@ -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()));
|
||||
}
|
||||
|
||||
|
||||
@@ -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()));
|
||||
}
|
||||
|
||||
|
||||
@@ -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()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user