summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authoromegadox <omegadox@gmail.com>2008-10-23 19:01:00 +0000
committeromegadox <omegadox@gmail.com>2008-10-23 19:01:00 +0000
commitdc5eaad82ced8eb9a3164168ddca1851abfb6c26 (patch)
tree1fda9b80255cbe0ff3021e32e2a97db96c8ad6f2 /Source
parent3b4d8a47b3c5573cb7f2afa2d41a7f9b87c1850d (diff)
ZTP bloom fix and MP1 and 2 skybox fix, I commented out sonic's hacks and just added comments about them.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@945 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp
index 584727ec6a..d13c0d1365 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp
@@ -424,7 +424,11 @@ void VertexShaderMngr::SetConstants(VERTEXSHADER& vs)
abs((int)(2 * rawViewport[0])) * MValueX, abs((int)(2 * rawViewport[1])) * MValueY);
}
- glDepthRange(-(0.0f - (rawViewport[5]-rawViewport[2])/-16777215.0f), rawViewport[5]/16777215.0f);
+ // Metroid Prime 1 & 2 likes this
+ glDepthRange(-(0.0f - (rawViewport[5]-rawViewport[2])/16777215.0f), rawViewport[5]/16777215.0f);
+
+ // FZero stage likes this (a sonic hack)
+ // glDepthRange(-(0.0f - (rawViewport[5]-rawViewport[2])/-16777215.0f), rawViewport[5]/16777215.0f);
}
if (bProjectionChanged) {
@@ -444,7 +448,10 @@ void VertexShaderMngr::SetConstants(VERTEXSHADER& vs)
g_fProjectionMatrix[8] = 0.0f;
g_fProjectionMatrix[9] = 0.0f;
g_fProjectionMatrix[10] = rawProjection[4];
+ // Working bloom in ZTP
g_fProjectionMatrix[11] = -(0.0f - rawProjection[5]); // Yes, it's important that it's done this way.
+ // Working projection in PSO
+ // g_fProjectionMatrix[11] = -(1.0f - rawProjection[5]);
g_fProjectionMatrix[12] = 0.0f;
g_fProjectionMatrix[13] = 0.0f;
@@ -465,7 +472,10 @@ void VertexShaderMngr::SetConstants(VERTEXSHADER& vs)
g_fProjectionMatrix[8] = 0.0f;
g_fProjectionMatrix[9] = 0.0f;
g_fProjectionMatrix[10] = rawProjection[4];
- g_fProjectionMatrix[11] = -(0.0f - rawProjection[5]); // Yes, it's important that it's done this way.
+ // Working bloom in ZTP
+ g_fProjectionMatrix[11] = -(-1.0f - rawProjection[5]); // Yes, it's important that it's done this way.
+ // Working projection in PSO
+ // g_fProjectionMatrix[11] = -(0.0f - rawProjection[5]);
g_fProjectionMatrix[12] = 0;
g_fProjectionMatrix[13] = 0;