summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexShaderManager.cpp
diff options
context:
space:
mode:
authorMarkus Wick <markus+github@selfnet.de>2014-12-30 12:30:01 +0100
committerMarkus Wick <markus+github@selfnet.de>2014-12-30 12:30:01 +0100
commitdd1e624fffde90171fb193495c267f46d650273f (patch)
tree4fddf7e811c957450d1f6267dc578d1d215673d7 /Source/Core/VideoCommon/VertexShaderManager.cpp
parent5d55bceeb3e0d600d37bc9f34fd3e71a26dc40a7 (diff)
parentb474c4229d18248b8b8de93a81bc99ac6a3bc2e4 (diff)
Merge pull request #1787 from Armada651/fix-3dvision
VertexShaderManager: Turn off the epsilon hack for Nvidia 3D Vision.
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexShaderManager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp
index 542328e523..4ca20a21f4 100644
--- a/Source/Core/VideoCommon/VertexShaderManager.cpp
+++ b/Source/Core/VideoCommon/VertexShaderManager.cpp
@@ -456,7 +456,10 @@ void VertexShaderManager::SetConstants()
g_fProjectionMatrix[13] = 0.0f;
g_fProjectionMatrix[14] = 0.0f;
- g_fProjectionMatrix[15] = 1.0f + FLT_EPSILON; // hack to fix depth clipping precision issues (such as Sonic Unleashed UI)
+
+ // Hack to fix depth clipping precision issues (such as Sonic Unleashed UI)
+ // Turn it off for Nvidia 3D Vision, because it can't handle such a projection matrix
+ g_fProjectionMatrix[15] = (g_ActiveConfig.iStereoMode == STEREO_3DVISION) ? 1.0f : 1.0f + FLT_EPSILON;
SETSTAT_FT(stats.g2proj_0, g_fProjectionMatrix[0]);
SETSTAT_FT(stats.g2proj_1, g_fProjectionMatrix[1]);