Revert "Remove option" (disable alpha test)

Fixes issue #6286.

This reverts commit d2ce635bbf.
This commit is contained in:
Henrik Rydgard 2014-06-10 22:54:01 +02:00
parent 2a3496b65c
commit 3e97713d16
4 changed files with 6 additions and 2 deletions

View file

@ -571,6 +571,7 @@ static ConfigSetting debuggerSettings[] = {
static ConfigSetting speedHackSettings[] = {
ReportedConfigSetting("PrescaleUV", &g_Config.bPrescaleUV, false),
ReportedConfigSetting("DisableAlphaTest", &g_Config.bDisableAlphaTest, false),
ConfigSetting(false),
};

View file

@ -254,6 +254,7 @@ public:
// * Still has major problems so off by default - need to store tex scale/offset per DeferredDrawCall,
// which currently isn't done so if texscale/offset isn't static (like in Tekken 6) things go wrong.
bool bPrescaleUV;
bool bDisableAlphaTest; // Helps PowerVR immensely, breaks some graphics
// End GLES hacks.
// Risky JIT optimizations

View file

@ -350,7 +350,7 @@ void ComputeFragmentShaderID(FragmentShaderID *id) {
} else {
bool lmode = gstate.isUsingSecondaryColor() && gstate.isLightingEnabled();
bool enableFog = gstate.isFogEnabled() && !gstate.isModeThrough();
bool enableAlphaTest = gstate.isAlphaTestEnabled() && !IsAlphaTestTriviallyTrue();
bool enableAlphaTest = gstate.isAlphaTestEnabled() && !IsAlphaTestTriviallyTrue() && !g_Config.bDisableAlphaTest;
bool alphaTestAgainstZero = gstate.getAlphaTestRef() == 0;
bool enableColorTest = gstate.isColorTestEnabled() && !IsColorTestTriviallyTrue();
bool alphaToColorDoubling = AlphaToColorDoubling();
@ -497,7 +497,7 @@ void GenerateFragmentShader(char *buffer) {
bool lmode = gstate.isUsingSecondaryColor() && gstate.isLightingEnabled();
bool doTexture = gstate.isTextureMapEnabled() && !gstate.isModeClear();
bool enableFog = gstate.isFogEnabled() && !gstate.isModeThrough() && !gstate.isModeClear();
bool enableAlphaTest = gstate.isAlphaTestEnabled() && !IsAlphaTestTriviallyTrue() && !gstate.isModeClear();
bool enableAlphaTest = gstate.isAlphaTestEnabled() && !IsAlphaTestTriviallyTrue() && !gstate.isModeClear() && !g_Config.bDisableAlphaTest;
bool alphaTestAgainstZero = gstate.getAlphaTestRef() == 0;
bool enableColorTest = gstate.isColorTestEnabled() && !IsColorTestTriviallyTrue() && !gstate.isModeClear();
bool alphaToColorDoubling = AlphaToColorDoubling();

View file

@ -189,6 +189,8 @@ void GameSettingsScreen::CreateViews() {
graphicsSettings->Add(new ItemHeader(gs->T("Hack Settings", "Hack Settings (these WILL cause glitches)")));
graphicsSettings->Add(new CheckBox(&g_Config.bTimerHack, gs->T("Timer Hack")));
// 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.bAlwaysDepthWrite, gs->T("Always Depth Write")));
CheckBox *prescale = graphicsSettings->Add(new CheckBox(&g_Config.bPrescaleUV, gs->T("Texture Coord Speedhack")));