Skip to content

Commit

Permalink
Add setting to turn off shader depal on OGL.
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaMoo committed Apr 14, 2018
1 parent 63cf6d2 commit 3f57c60
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions Core/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions Core/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 3 additions & 5 deletions GPU/GLES/TextureCacheGLES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 5 additions & 0 deletions UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3f57c60

Please sign in to comment.