VertexShaderManager: Add an epsilon hack to the perspective projection.

This commit is contained in:
Jules Blok 2016-01-05 01:24:54 +01:00
parent f0e5811d9a
commit 358e458a93
1 changed files with 3 additions and 4 deletions

View File

@ -432,10 +432,9 @@ void VertexShaderManager::SetConstants()
g_fProjectionMatrix[12] = 0.0f; g_fProjectionMatrix[12] = 0.0f;
g_fProjectionMatrix[13] = 0.0f; g_fProjectionMatrix[13] = 0.0f;
// donkopunchstania suggested the GC GPU might round differently
// He had thus changed this to -(1 + epsilon) to fix clipping issues. // Hack to fix depth clipping precision issues (such as Sonic Adventure UI)
// I (neobrain) don't think his conjecture is true and thus reverted his change. g_fProjectionMatrix[14] = -(1.0f + FLT_EPSILON);
g_fProjectionMatrix[14] = -1.0f;
g_fProjectionMatrix[15] = 0.0f; g_fProjectionMatrix[15] = 0.0f;
// Heuristic to detect if a GameCube game is in 16:9 anamorphic widescreen mode. // Heuristic to detect if a GameCube game is in 16:9 anamorphic widescreen mode.