From ac3c29108c4af1ff8cc0a74bedee5b3f41972481 Mon Sep 17 00:00:00 2001 From: Sonicadvance1 Date: Tue, 4 Nov 2008 05:49:48 +0000 Subject: [PATCH] Removed inverting the depth, still needs to be removed from config, and I also cleared up a line of code that was annoying to look at git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1065 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../Plugin_VideoOGL/Src/VertexShaderManager.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp index 4eef41b787..d17d7005ac 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp @@ -421,16 +421,7 @@ void VertexShaderMngr::SetConstants() Renderer::GetTargetHeight()-((int)(xfregs.rawViewport[4]-xfregs.rawViewport[1]-342-scissorYOff)) * MValueY, abs((int)(2 * xfregs.rawViewport[0])) * MValueX, abs((int)(2 * xfregs.rawViewport[1])) * MValueY); } - - // Standard depth range - //glDepthRange(-(0.0f - (xfregs.rawViewport[5]-xfregs.rawViewport[2])/-16777215.0f), xfregs.rawViewport[5]/16777215.0f); - - // Metroid Prime 1 & 2 likes this - //glDepthRange(-(0.0f - (xfregs.rawViewport[5]-xfregs.rawViewport[2])/16777215.0f), xfregs.rawViewport[5]/16777215.0f); - glDepthRange((g_Config.bInvertDepth ? -1 : 1) * -(0.0f - (xfregs.rawViewport[5]-xfregs.rawViewport[2])/16777215.0f), xfregs.rawViewport[5]/16777215.0f); - - // FZero stage likes this (a sonic hack) - // glDepthRange(-(0.0f - (xfregs.rawViewport[5]-xfregs.rawViewport[2])/-16777215.0f), xfregs.rawViewport[5]/16777215.0f); + glDepthRange((xfregs.rawViewport[5]- xfregs.rawViewport[2])/16777215.0f, xfregs.rawViewport[5]/16777215.0f); } if (bProjectionChanged) { @@ -450,8 +441,8 @@ void VertexShaderMngr::SetConstants() g_fProjectionMatrix[8] = 0.0f; g_fProjectionMatrix[9] = 0.0f; g_fProjectionMatrix[10] = xfregs.rawProjection[4]; - - g_fProjectionMatrix[11] = xfregs.rawProjection[5]; + g_fProjectionMatrix[11] = xfregs.rawProjection[5]; + g_fProjectionMatrix[12] = 0.0f; g_fProjectionMatrix[13] = 0.0f; // donkopunchstania: GC GPU rounds differently? @@ -473,7 +464,7 @@ void VertexShaderMngr::SetConstants() g_fProjectionMatrix[8] = 0.0f; g_fProjectionMatrix[9] = 0.0f; g_fProjectionMatrix[10] = xfregs.rawProjection[4]; - g_fProjectionMatrix[11] = -(-1.0f - xfregs.rawProjection[5]); + g_fProjectionMatrix[11] = 1.0f + xfregs.rawProjection[5]; g_fProjectionMatrix[12] = 0; g_fProjectionMatrix[13] = 0;