summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/Render.cpp
diff options
context:
space:
mode:
authorYuriy O'Donnell <yuriyo@gmail.com>2014-10-25 00:26:28 +0200
committerYuriy O'Donnell <yuriyo@gmail.com>2014-11-29 11:11:28 +0100
commitcc2227fbc3fdb22d19036a7721b30b099190b716 (patch)
tree0dc8f5459340f0ddd727c9630ded22f024adc97f /Source/Core/VideoBackends/D3D/Render.cpp
parentd4125231f39924c7393f594288d3480e040579b4 (diff)
D3D: Replaced shader-based depth range remap with viewport
This fixes UI rendering in some games mentioned in https://code.google.com/p/dolphin-emu/issues/detail?id=7785
Diffstat (limited to 'Source/Core/VideoBackends/D3D/Render.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/Render.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp
index 0441e63d7b..6705364189 100644
--- a/Source/Core/VideoBackends/D3D/Render.cpp
+++ b/Source/Core/VideoBackends/D3D/Render.cpp
@@ -487,8 +487,8 @@ void Renderer::SetViewport()
// Some games set invalid values for z-min and z-max so fix them to the max and min allowed and let the shaders do this work
D3D11_VIEWPORT vp = CD3D11_VIEWPORT(X, Y, Wd, Ht,
- 0.f, // (xfmem.viewport.farZ - xfmem.viewport.zRange) / 16777216.0f;
- 1.f); // xfmem.viewport.farZ / 16777216.0f;
+ (xfmem.viewport.farZ - xfmem.viewport.zRange) / 16777216.0f,
+ xfmem.viewport.farZ / 16777216.0f);
D3D::context->RSSetViewports(1, &vp);
}