diff --git a/Core/Config.cpp b/Core/Config.cpp index dd0dcc4b2ffb..337e77b89a17 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -516,6 +516,7 @@ static ConfigSetting graphicsSettings[] = { ConfigSetting("SoftwareRenderer", &g_Config.bSoftwareRendering, false, true, true), ReportedConfigSetting("HardwareTransform", &g_Config.bHardwareTransform, true, true, true), ReportedConfigSetting("SoftwareSkinning", &g_Config.bSoftwareSkinning, true, true, true), + ConfigSetting("ShaderDepal", &g_Config.bShaderDepal, false, true, true), ReportedConfigSetting("TextureFiltering", &g_Config.iTexFiltering, 1, true, true), ReportedConfigSetting("BufferFiltering", &g_Config.iBufFilter, 1, true, true), ReportedConfigSetting("InternalResolution", &g_Config.iInternalResolution, &DefaultInternalResolution, true, true), diff --git a/Core/Config.h b/Core/Config.h index 66bfe22c0342..983df3ef4e7d 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -162,6 +162,7 @@ struct Config { bool bSoftwareRendering; bool bHardwareTransform; // only used in the GLES backend bool bSoftwareSkinning; // may speed up some games + bool bShaderDepal; int iRenderingMode; // 0 = non-buffered rendering 1 = buffered rendering int iTexFiltering; // 1 = off , 2 = nearest , 3 = linear , 4 = linear(CG) diff --git a/GPU/GLES/TextureCacheGLES.cpp b/GPU/GLES/TextureCacheGLES.cpp index 82589441931c..69e354017001 100644 --- a/GPU/GLES/TextureCacheGLES.cpp +++ b/GPU/GLES/TextureCacheGLES.cpp @@ -439,12 +439,10 @@ class TextureShaderApplier { void TextureCacheGLES::ApplyTextureFramebuffer(TexCacheEntry *entry, VirtualFramebuffer *framebuffer) { DepalShader *depal = nullptr; uint32_t clutMode = gstate.clutformat & 0xFFFFFF; - -#if 0 - bool useShaderDepal = gstate_c.Supports(GPU_SUPPORTS_GLSL_ES_300); -#else bool useShaderDepal = false; -#endif + if (g_Config.bShaderDepal) { + useShaderDepal = gstate_c.Supports(GPU_SUPPORTS_GLSL_ES_300); + } if ((entry->status & TexCacheEntry::STATUS_DEPALETTIZE) && !g_Config.bDisableSlowFramebufEffects) { if (useShaderDepal) { diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 55894531d5cb..87ff7ffee65c 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -326,6 +326,11 @@ void GameSettingsScreen::CreateViews() { }); swSkin->SetDisabledPtr(&g_Config.bSoftwareRendering); + if (g_Config.iGPUBackend == (int)GPUBackend::OPENGL) { + CheckBox *shaderDepal = graphicsSettings->Add(new CheckBox(&g_Config.bShaderDepal, gr->T("Shader Depal"))); + shaderDepal->SetDisabledPtr(&g_Config.bSoftwareRendering); + } + CheckBox *vtxCache = graphicsSettings->Add(new CheckBox(&g_Config.bVertexCache, gr->T("Vertex Cache"))); vtxCache->OnClick.Add([=](EventParams &e) { settingInfo_->Show(gr->T("VertexCache Tip", "Faster, but may cause temporary flicker"), e.v);