From 4df49a72ab4c6dcb4cf7553fd6dfb54fa77ce4b2 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Thu, 13 Mar 2014 18:59:49 +0100 Subject: [PATCH] Add yet another hack setting to work around the 3rd Birthday problem. Hopefully temporary... --- Core/Config.cpp | 1 + Core/Config.h | 1 + GPU/GLES/StateMapping.cpp | 3 +++ UI/GameSettingsScreen.cpp | 1 + 4 files changed, 6 insertions(+) diff --git a/Core/Config.cpp b/Core/Config.cpp index c0ecd0f65..62e962d24 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -392,6 +392,7 @@ static ConfigSetting graphicsSettings[] = { // Not really a graphics setting... ReportedConfigSetting("TimerHack", &g_Config.bTimerHack, &DefaultTimerHack), + ReportedConfigSetting("AlphaMaskHack", &g_Config.bAlphaMaskHack, false), ReportedConfigSetting("LowQualitySplineBezier", &g_Config.bLowQualitySplineBezier, false), ReportedConfigSetting("PostShader", &g_Config.sPostShaderName, "Off"), diff --git a/Core/Config.h b/Core/Config.h index 2c9fc26ae..300256da1 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -138,6 +138,7 @@ public: bool bDisableStencilTest; bool bAlwaysDepthWrite; bool bTimerHack; + bool bAlphaMaskHack; bool bLowQualitySplineBezier; std::string sPostShaderName; // Off for off. diff --git a/GPU/GLES/StateMapping.cpp b/GPU/GLES/StateMapping.cpp index 6e45cb782..d2c14be7c 100644 --- a/GPU/GLES/StateMapping.cpp +++ b/GPU/GLES/StateMapping.cpp @@ -419,6 +419,9 @@ void TransformDrawEngine::ApplyDrawState(int prim) { amask = false; } } + if (g_Config.bAlphaMaskHack) { + amask = true; // Yes, this makes no sense, but it "fixes" the 3rd Birthday by popular demand. + } glstate.colorMask.set(rmask, gmask, bmask, amask); diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 6658edcc1..300d4506d 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -202,6 +202,7 @@ void GameSettingsScreen::CreateViews() { // Maybe hide this on non-PVR? graphicsSettings->Add(new CheckBox(&g_Config.bDisableAlphaTest, gs->T("Disable Alpha Test (PowerVR speedup)")))->OnClick.Handle(this, &GameSettingsScreen::OnShaderChange); graphicsSettings->Add(new CheckBox(&g_Config.bDisableStencilTest, gs->T("Disable Stencil Test"))); + graphicsSettings->Add(new CheckBox(&g_Config.bAlphaMaskHack, gs->T("Alpha Mask Hack (3rd Birthday)"))); graphicsSettings->Add(new CheckBox(&g_Config.bAlwaysDepthWrite, gs->T("Always Depth Write"))); CheckBox *prescale = graphicsSettings->Add(new CheckBox(&g_Config.bPrescaleUV, gs->T("Texture Coord Speedhack"))); if (PSP_IsInited())