Skip to content

Commit

Permalink
Merge pull request #3448 from Armada651/depth-epsilon
Browse files Browse the repository at this point in the history
VertexShaderManager: Add an epsilon hack to the perspective projection.
  • Loading branch information
CrossVR committed Jan 18, 2016
2 parents 38875e5 + 358e458 commit 51a36f2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Source/Core/VideoCommon/VertexShaderManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,9 @@ void VertexShaderManager::SetConstants()

g_fProjectionMatrix[12] = 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.
// I (neobrain) don't think his conjecture is true and thus reverted his change.
g_fProjectionMatrix[14] = -1.0f;

// Hack to fix depth clipping precision issues (such as Sonic Adventure UI)
g_fProjectionMatrix[14] = -(1.0f + FLT_EPSILON);
g_fProjectionMatrix[15] = 0.0f;

// Heuristic to detect if a GameCube game is in 16:9 anamorphic widescreen mode.
Expand Down

0 comments on commit 51a36f2

Please sign in to comment.