summaryrefslogtreecommitdiff
path: root/Source
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
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')
-rw-r--r--Source/Core/VideoCommon/Src/VertexShaderManager.cpp33
-rw-r--r--Source/Core/VideoCommon/Src/VertexShaderManager.h2
-rw-r--r--Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp2
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/Config.cpp2
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/Config.h1
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp17
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h2
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp2
8 files changed, 9 insertions, 52 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();
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp b/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp
index 4393bbe55a..e7be031039 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp
@@ -189,7 +189,7 @@ void Flush()
VertexShaderCache::SetShader(g_nativeVertexFmt->m_components); // TODO(ector): only do this if shader has changed
// set global constants
- VertexShaderManager::SetConstants(false,false);
+ VertexShaderManager::SetConstants(false);
PixelShaderManager::SetConstants();
int stride = g_nativeVertexFmt->GetVertexStride();
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Config.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Config.cpp
index 34ea0722ef..024ecc8014 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/Config.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/Config.cpp
@@ -83,7 +83,6 @@ void Config::Load()
iniFile.Get("Hacks", "EFBCopyDisable", &bEFBCopyDisable, 0);
iniFile.Get("Hacks", "EFBCopyDisableHotKey", &bEFBCopyDisableHotKey, 0);
iniFile.Get("Hacks", "ProjectionHax1", &bProjectionHax1, 0);
- iniFile.Get("Hacks", "ProjectionHax2", &bProjectionHax2, 0);
iniFile.Get("Hacks", "EFBToTextureEnable", &bCopyEFBToRAM, 0);
}
@@ -126,7 +125,6 @@ void Config::Save()
iniFile.Set("Hacks", "EFBCopyDisable", bEFBCopyDisable);
iniFile.Set("Hacks", "EFBCopyDisableHotKey", bEFBCopyDisableHotKey);
iniFile.Set("Hacks", "ProjectionHax1", bProjectionHax1);
- iniFile.Set("Hacks", "ProjectionHax2", bProjectionHax2);
iniFile.Set("Hacks", "EFBToTextureEnable", bCopyEFBToRAM);
iniFile.Save(FULL_CONFIG_DIR "gfx_opengl.ini");
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Config.h b/Source/Plugins/Plugin_VideoOGL/Src/Config.h
index 11285b8d05..5eecbf5b36 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/Config.h
+++ b/Source/Plugins/Plugin_VideoOGL/Src/Config.h
@@ -75,7 +75,6 @@ struct Config
bool bEFBCopyDisable;
bool bEFBCopyDisableHotKey;
bool bProjectionHax1;
- bool bProjectionHax2;
bool bCopyEFBToRAM;
bool bSafeTextureCache;
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp
index da12415570..684baabca8 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp
@@ -56,8 +56,6 @@ BEGIN_EVENT_TABLE(ConfigDialog,wxDialog)
EVT_CHECKBOX(ID_DISABLETEXTURING, ConfigDialog::AdvancedSettingsChanged)
EVT_CHECKBOX(ID_EFBCOPYDISABLEHOTKEY, ConfigDialog::AdvancedSettingsChanged)
EVT_CHECKBOX(ID_PROJECTIONHACK1,ConfigDialog::AdvancedSettingsChanged)
- EVT_CHECKBOX(ID_PROJECTIONHACK2,ConfigDialog::AdvancedSettingsChanged)
-
EVT_CHECKBOX(ID_SAFETEXTURECACHE,ConfigDialog::AdvancedSettingsChanged)
EVT_CHECKBOX(ID_CHECKBOX_DISABLECOPYEFB, ConfigDialog::AdvancedSettingsChanged)
EVT_DIRPICKER_CHANGED(ID_TEXTUREPATH, ConfigDialog::TexturePathChange)
@@ -336,31 +334,25 @@ void ConfigDialog::CreateGUIControls()
// Hacks controls
m_SafeTextureCache = new wxCheckBox(m_PageAdvanced, ID_SAFETEXTURECACHE, wxT("Use Safe texture cache"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_ProjectionHax1 = new wxCheckBox(m_PageAdvanced, ID_PROJECTIONHACK1, wxT("Projection before R945"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
- m_ProjectionHax2 = new wxCheckBox(m_PageAdvanced, ID_PROJECTIONHACK2, wxT("Projection hack of R844"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
-
+ m_ProjectionHax1 = new wxCheckBox(m_PageAdvanced, ID_PROJECTIONHACK1, wxT("ZTP Bloom hack"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
// Disabled or enabled
m_SafeTextureCache->Enable(true);
m_ProjectionHax1->Enable(true);
- m_ProjectionHax2->Enable(true);
// Default values
m_SafeTextureCache->SetValue(g_Config.bSafeTextureCache);
m_ProjectionHax1->SetValue(g_Config.bProjectionHax1);
- m_ProjectionHax2->SetValue(g_Config.bProjectionHax2);
// Tool tips
m_SafeTextureCache->SetToolTip(wxT("This is useful to prevent Metroid Prime from crashing, but can cause problems in other games."
" [This option will apply immediately and does not require a restart. However it may not"
" be entirely safe to change it midgames.]"));
- m_ProjectionHax1->SetToolTip(wxT("This may reveal otherwise invisible graphics"
- " in\ngames like Mario Galaxy or Ikaruga."));
+ m_ProjectionHax1->SetToolTip(wxT("This should get ZTP's Bloom to show"));
// Sizers
sHacks = new wxGridBagSizer(0, 0);
sHacks->Add(m_ProjectionHax1, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 5);
- sHacks->Add(m_ProjectionHax2, wxGBPosition(1, 0), wxGBSpan(1, 2), wxALL, 5);
- sHacks->Add(m_SafeTextureCache, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALL, 5);
+ sHacks->Add(m_SafeTextureCache, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL, 5);
sbHacks = new wxStaticBoxSizer(wxVERTICAL, m_PageAdvanced, wxT("Hacks"));
sbHacks->Add(sHacks, 0, wxEXPAND | (wxTOP), 0);
@@ -530,9 +522,6 @@ void ConfigDialog::AdvancedSettingsChanged(wxCommandEvent& event)
case ID_PROJECTIONHACK1:
g_Config.bProjectionHax1 = m_ProjectionHax1->IsChecked();
break;
- case ID_PROJECTIONHACK2:
- g_Config.bProjectionHax2 = m_ProjectionHax2->IsChecked();
- break;
case ID_SAFETEXTURECACHE:
g_Config.bSafeTextureCache = m_SafeTextureCache->IsChecked();
break;
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h
index 7edffb4b6b..9fa4245ba1 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h
+++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h
@@ -109,7 +109,6 @@ class ConfigDialog : public wxDialog
wxDirPickerCtrl *m_TexturePath;
wxCheckBox *m_EFBCopyDisableHotKey;
wxCheckBox *m_ProjectionHax1;
- wxCheckBox *m_ProjectionHax2;
wxCheckBox *m_SafeTextureCache;
// Screen size
wxStaticText *m_TextScreenWidth, *m_TextScreenHeight, *m_TextScreenLeft, *m_TextScreenTop;
@@ -164,7 +163,6 @@ class ConfigDialog : public wxDialog
ID_CHECKBOX_DISABLECOPYEFB,
ID_EFBCOPYDISABLEHOTKEY,
ID_PROJECTIONHACK1,
- ID_PROJECTIONHACK2,
ID_RADIO_COPYEFBTORAM,
ID_RADIO_COPYEFBTOGL,
};
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp
index ab4ccaba04..42d014e744 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp
@@ -259,7 +259,7 @@ void Flush()
}
// set global constants
- VertexShaderManager::SetConstants(g_Config.bProjectionHax1, g_Config.bProjectionHax2);
+ VertexShaderManager::SetConstants(g_Config.bProjectionHax1);
PixelShaderManager::SetConstants();
// finally bind