mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 15:31:17 +01:00
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
This commit is contained in:
parent
0f5fed3a88
commit
5ce9ffeab7
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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");
|
||||
|
@ -75,7 +75,6 @@ struct Config
|
||||
bool bEFBCopyDisable;
|
||||
bool bEFBCopyDisableHotKey;
|
||||
bool bProjectionHax1;
|
||||
bool bProjectionHax2;
|
||||
bool bCopyEFBToRAM;
|
||||
bool bSafeTextureCache;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
};
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user