summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexShaderManager.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-12-03 14:49:30 -0500
committerLioncash <mathew1800@gmail.com>2014-12-03 14:49:30 -0500
commit88cd27bbcaaa46b8bbd3cf29ee71327c629be0c2 (patch)
tree7f8799a92409bbd9fd9efe8327b305a3724adbdd /Source/Core/VideoCommon/VertexShaderManager.cpp
parentb9b3277fb52cc14065082482b0c654217b39841c (diff)
parent36b886cb802c44eb02482b17ce483ba76ccb25ee (diff)
Merge pull request #1392 from kayru/d3d_viewport_depth
D3D: Replaced shader-based depth range remap with viewport
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexShaderManager.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp
index 8de50c5436..2d496cb50c 100644
--- a/Source/Core/VideoCommon/VertexShaderManager.cpp
+++ b/Source/Core/VideoCommon/VertexShaderManager.cpp
@@ -359,8 +359,6 @@ void VertexShaderManager::SetConstants()
if (bViewportChanged)
{
bViewportChanged = false;
- constants.depthparams[0] = xfmem.viewport.farZ / 16777216.0f;
- constants.depthparams[1] = xfmem.viewport.zRange / 16777216.0f;
// The console GPU places the pixel center at 7/12 unless antialiasing
// is enabled, while D3D and OpenGL place it at 0.5. See the comment
@@ -370,8 +368,8 @@ void VertexShaderManager::SetConstants()
const float pixel_center_correction = 7.0f / 12.0f - 0.5f;
const float pixel_size_x = 2.f / Renderer::EFBToScaledXf(2.f * xfmem.viewport.wd);
const float pixel_size_y = 2.f / Renderer::EFBToScaledXf(2.f * xfmem.viewport.ht);
- constants.depthparams[2] = pixel_center_correction * pixel_size_x;
- constants.depthparams[3] = pixel_center_correction * pixel_size_y;
+ constants.pixelcentercorrection[0] = pixel_center_correction * pixel_size_x;
+ constants.pixelcentercorrection[1] = pixel_center_correction * pixel_size_y;
dirty = true;
// This is so implementation-dependent that we can't have it here.
g_renderer->SetViewport();