summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexShaderManager.cpp
diff options
context:
space:
mode:
authorYuriy O'Donnell <yuriyo@gmail.com>2014-10-23 00:20:47 +0200
committerYuriy O'Donnell <yuriyo@gmail.com>2014-10-23 00:20:47 +0200
commitdb497cc55f0420f1888bd072ee3afcbf34700848 (patch)
treee073a58f5543a0aa32b3617d60e13d69379d8672 /Source/Core/VideoCommon/VertexShaderManager.cpp
parentce3a039eed7223775683f266af05bdb5833d06a6 (diff)
Added projection matrix epsilon that fixes depth clipping issues in some games
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexShaderManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp
index 022bf7683d..c87c9297ba 100644
--- a/Source/Core/VideoCommon/VertexShaderManager.cpp
+++ b/Source/Core/VideoCommon/VertexShaderManager.cpp
@@ -475,7 +475,7 @@ void VertexShaderManager::SetConstants()
g_fProjectionMatrix[13] = 0.0f;
g_fProjectionMatrix[14] = 0.0f;
- g_fProjectionMatrix[15] = 1.0f;
+ g_fProjectionMatrix[15] = 1.0f + FLT_EPSILON; // hack to fix depth clipping precision issues (such as Sonic Unleashed UI)
SETSTAT_FT(stats.g2proj_0, g_fProjectionMatrix[0]);
SETSTAT_FT(stats.g2proj_1, g_fProjectionMatrix[1]);