summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexShaderManager.cpp
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2016-08-15 15:25:50 +0200
committerJules Blok <jules.blok@gmail.com>2016-08-16 21:09:58 +0200
commit7078216b61777ff89350d1bdc66c7c032b0b2296 (patch)
tree16c1ec3a1ecbb44e7806224113fc08a17febe9af /Source/Core/VideoCommon/VertexShaderManager.cpp
parent8c1c7fc2da65eea1a8244ce196d94313f7fdfb1b (diff)
Improve documentation.
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexShaderManager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp
index dabc7870fd..9b1c3437fe 100644
--- a/Source/Core/VideoCommon/VertexShaderManager.cpp
+++ b/Source/Core/VideoCommon/VertexShaderManager.cpp
@@ -389,8 +389,9 @@ void VertexShaderManager::SetConstants()
// The depth range is handled in the vertex shader. We need to reverse
// the far value to get a reversed depth range mapping. This is necessary
- // because we have the most precision at the near plane, while the console
- // has the most percision at the far plane.
+ // because the standard depth range equation pushes all depth values towards
+ // the back of the depth buffer where conventionally depth buffers have the
+ // least precision.
constants.pixelcentercorrection[2] = xfmem.viewport.zRange / 16777215.0f;
constants.pixelcentercorrection[3] = 1.0f - xfmem.viewport.farZ / 16777215.0f;