From f49d270c26b7bec6a734046d65c98b271ab35038 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Wed, 20 Mar 2024 00:54:12 +0000 Subject: [PATCH] Don't throw away user-provided shadow map resolutions Resolves https://gitlab.com/OpenMW/openmw/-/issues/7891 I think this is better than just adding 8192 as an allowed option as the vast majority of GPUs would be too slow given what we know about the cost if that setting (maybe that'll change if we get rid of the unconditional conditional discard I suspect is the cause of the slowness that's there for no good reason since the shadowsbin already moves most drawables to a known alpha-free stateset). --- apps/launcher/settingspage.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/launcher/settingspage.cpp b/apps/launcher/settingspage.cpp index 93a724909e..1641fa07d7 100644 --- a/apps/launcher/settingspage.cpp +++ b/apps/launcher/settingspage.cpp @@ -246,6 +246,11 @@ bool Launcher::SettingsPage::loadSettings() int shadowResIndex = shadowResolutionComboBox->findText(QString::number(shadowRes)); if (shadowResIndex != -1) shadowResolutionComboBox->setCurrentIndex(shadowResIndex); + else + { + shadowResolutionComboBox->addItem(QString::number(shadowRes)); + shadowResolutionComboBox->setCurrentIndex(shadowResolutionComboBox->count() - 1); + } connect(shadowDistanceCheckBox, &QCheckBox::toggled, this, &SettingsPage::slotShadowDistLimitToggled);