diff options
| author | Jules Blok <jules.blok@gmail.com> | 2016-08-31 01:54:05 +0200 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2016-09-01 01:14:14 +0200 |
| commit | debaf63fe8abc4d534c0cac7540eb8607e2c5c91 (patch) | |
| tree | 82c84d300b0cfc00429da042a86f3f1c3a030533 /Source/Core/VideoCommon/VertexShaderManager.cpp | |
| parent | 081cad709a0896e7deafe5b235a5d728d84b24d0 (diff) | |
VertexShaderGen: Move the sonic epsilon hack to the vertex shader.
In the vertex shader we have control over the depth clipping planes,
so we don't have to offset every floating point value and lose accuracy.
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderManager.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexShaderManager.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp index e8f82d0bf5..11f5be0ab5 100644 --- a/Source/Core/VideoCommon/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/VertexShaderManager.cpp @@ -454,8 +454,7 @@ void VertexShaderManager::SetConstants() g_fProjectionMatrix[12] = 0.0f; g_fProjectionMatrix[13] = 0.0f; - // Hack to fix depth clipping precision issues (such as Sonic Adventure UI) - g_fProjectionMatrix[14] = -(1.0f + FLT_EPSILON); + g_fProjectionMatrix[14] = -1.0f; g_fProjectionMatrix[15] = 0.0f; // Heuristic to detect if a GameCube game is in 16:9 anamorphic widescreen mode. @@ -511,9 +510,7 @@ void VertexShaderManager::SetConstants() g_fProjectionMatrix[13] = 0.0f; g_fProjectionMatrix[14] = 0.0f; - - // Hack to fix depth clipping precision issues (such as Sonic Unleashed UI) - g_fProjectionMatrix[15] = 1.0f + FLT_EPSILON; + g_fProjectionMatrix[15] = 1.0f; SETSTAT_FT(stats.g2proj_0, g_fProjectionMatrix[0]); SETSTAT_FT(stats.g2proj_1, g_fProjectionMatrix[1]); |
