Merge pull request #1787 from Armada651/fix-3dvision

VertexShaderManager: Turn off the epsilon hack for Nvidia 3D Vision.
This commit is contained in:
Markus Wick 2014-12-30 12:30:01 +01:00
commit dd1e624fff
1 changed files with 4 additions and 1 deletions

View File

@ -456,7 +456,10 @@ void VertexShaderManager::SetConstants()
g_fProjectionMatrix[13] = 0.0f; g_fProjectionMatrix[13] = 0.0f;
g_fProjectionMatrix[14] = 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_0, g_fProjectionMatrix[0]);
SETSTAT_FT(stats.g2proj_1, g_fProjectionMatrix[1]); SETSTAT_FT(stats.g2proj_1, g_fProjectionMatrix[1]);