From 06a5de0972410cf9ca14376b144865fd52d3f400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 14 Apr 2025 00:24:03 +0200 Subject: [PATCH] Move the "Always on" option for lens flare occlusion to developer settings --- UI/DeveloperToolsScreen.cpp | 6 ++++++ UI/GameSettingsScreen.cpp | 2 ++ 2 files changed, 8 insertions(+) diff --git a/UI/DeveloperToolsScreen.cpp b/UI/DeveloperToolsScreen.cpp index d9bba48354..f6dbef2ad0 100644 --- a/UI/DeveloperToolsScreen.cpp +++ b/UI/DeveloperToolsScreen.cpp @@ -337,6 +337,12 @@ void DeveloperToolsScreen::CreateGraphicsTab(UI::LinearLayout *list) { }); } + static const char *depthRasterModes[] = { "Auto (default)", "Low", "Off", "Always on" }; + + PopupMultiChoice *depthRasterMode = list->Add(new PopupMultiChoice(&g_Config.iDepthRasterMode, gr->T("Lens flare occlusion"), depthRasterModes, 0, ARRAY_SIZE(depthRasterModes), I18NCat::GRAPHICS, screenManager())); + depthRasterMode->SetDisabledPtr(&g_Config.bSoftwareRendering); + depthRasterMode->SetChoiceIcon(3, ImageID("I_WARNING")); // It's a performance trap. + list->Add(new ItemHeader(dev->T("Ubershaders"))); if (draw->GetShaderLanguageDesc().bitwiseOps && !draw->GetBugs().Has(Draw::Bugs::UNIFORM_INDEXING_BROKEN)) { // If the above if fails, the checkbox is redundant since it'll be force disabled anyway. diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 151a19ca92..f96341b339 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -441,6 +441,8 @@ void GameSettingsScreen::CreateGraphicsSettings(UI::ViewGroup *graphicsSettings) PopupMultiChoice *depthRasterMode = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iDepthRasterMode, gr->T("Lens flare occlusion"), depthRasterModes, 0, ARRAY_SIZE(depthRasterModes), I18NCat::GRAPHICS, screenManager())); depthRasterMode->SetDisabledPtr(&g_Config.bSoftwareRendering); depthRasterMode->SetChoiceIcon(3, ImageID("I_WARNING")); // It's a performance trap. + if (g_Config.iDepthRasterMode != 3) + depthRasterMode->HideChoice(3); CheckBox *texBackoff = graphicsSettings->Add(new CheckBox(&g_Config.bTextureBackoffCache, gr->T("Lazy texture caching", "Lazy texture caching (speedup)"))); texBackoff->SetDisabledPtr(&g_Config.bSoftwareRendering);