summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authoromegadox <omegadox@gmail.com>2009-03-06 21:56:13 +0000
committeromegadox <omegadox@gmail.com>2009-03-06 21:56:13 +0000
commit5ce9ffeab75d9b65fa05b2e0e7339a4a83902ea5 (patch)
tree9eb92136b4b9357dfc5aabea5c7338ed460a87e2 /Source/Core
parent0f5fed3a881a98f079218b3c751f5782885180c7 (diff)
Projection fix, Projection 1 hack changed to ZTP Bloom hack. That bloom is a bugged because of something else, not because of the projection. The proj hacks happens to makes it show.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2573 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoCommon/Src/VertexShaderManager.cpp33
-rw-r--r--Source/Core/VideoCommon/Src/VertexShaderManager.h2
2 files changed, 4 insertions, 31 deletions
diff --git a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp
index 5afc5a37f0..c9531d429c 100644
--- a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp
+++ b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp
@@ -69,7 +69,7 @@ void VertexShaderManager::Shutdown()
// =======================================================================================
// Syncs the shader constant buffers with xfmem
// ----------------
-void VertexShaderManager::SetConstants(bool proj_hax_1, bool proj_hax_2)
+void VertexShaderManager::SetConstants(bool proj_hax_1)
{
//nTransformMatricesChanged[0] = 0; nTransformMatricesChanged[1] = 256;
//nNormalMatricesChanged[0] = 0; nNormalMatricesChanged[1] = 96;
@@ -213,20 +213,7 @@ void VertexShaderManager::SetConstants(bool proj_hax_1, bool proj_hax_2)
g_fProjectionMatrix[8] = 0.0f;
g_fProjectionMatrix[9] = 0.0f;
g_fProjectionMatrix[10] = xfregs.rawProjection[4];
-
- //---------Projection[11]---------
- // No hacks
- if ((!proj_hax_1 && !proj_hax_2) || (proj_hax_1 && proj_hax_2))
- g_fProjectionMatrix[11] = xfregs.rawProjection[5];
-
- // Before R945 Hack
- if (proj_hax_1 && !proj_hax_2)
- g_fProjectionMatrix[11] = -(1.0f - xfregs.rawProjection[5]);
-
- // R844 Hack
- //if (!proj_hax_1 && proj_hax_2)
- // g_fProjectionMatrix[11] = xfregs.rawProjection[5];
- //--------------------------------
+ g_fProjectionMatrix[11] = xfregs.rawProjection[5];
g_fProjectionMatrix[12] = 0.0f;
g_fProjectionMatrix[13] = 0.0f;
@@ -266,21 +253,7 @@ void VertexShaderManager::SetConstants(bool proj_hax_1, bool proj_hax_2)
g_fProjectionMatrix[8] = 0.0f;
g_fProjectionMatrix[9] = 0.0f;
g_fProjectionMatrix[10] = xfregs.rawProjection[4];
-
- //---------Projection[11]---------
- // No hacks
- if ((!proj_hax_1 && !proj_hax_2) || (proj_hax_1 && proj_hax_2))
- g_fProjectionMatrix[11] = xfregs.rawProjection[5] + 0.1f;
-
- // Before R945 Hack
- if (proj_hax_1 && !proj_hax_2)
- g_fProjectionMatrix[11] = -(0.0f - xfregs.rawProjection[5]);
-
- // R844 Hack
- if (!proj_hax_1 && proj_hax_2)
- g_fProjectionMatrix[11] = -xfregs.rawProjection[5];
-
- //--------------------------------
+ g_fProjectionMatrix[11] = xfregs.rawProjection[5] + (proj_hax_1 ? 0.1f : 0.0f);
g_fProjectionMatrix[12] = 0.0f;
g_fProjectionMatrix[13] = 0.0f;
diff --git a/Source/Core/VideoCommon/Src/VertexShaderManager.h b/Source/Core/VideoCommon/Src/VertexShaderManager.h
index 06f8a1a168..a0b1c31994 100644
--- a/Source/Core/VideoCommon/Src/VertexShaderManager.h
+++ b/Source/Core/VideoCommon/Src/VertexShaderManager.h
@@ -28,7 +28,7 @@ public:
static void Shutdown();
// constant management
- static void SetConstants(bool proj_hax_1, bool proj_hax_2);
+ static void SetConstants(bool proj_hax_1);
static void SetViewport(float* _Viewport);
static void SetViewportChanged();