diff --git a/src/configuration.cpp b/src/configuration.cpp index a6971bf9855..fb4b8a49107 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -600,6 +600,11 @@ bool loadConfig() debug(LOG_WARNING, "Unsupported / invalid terrainShaderQuality value: %d; defaulting to: %d", intValue, static_cast(getTerrainShaderQuality())); } } + war_setShadowFilterSize(iniGetInteger("shadowFilterSize", (int)war_getShadowFilterSize()).value()); + if (auto value = iniGetIntegerOpt("shadowMapResolution")) + { + war_setShadowMapResolution(value.value()); + } ActivityManager::instance().endLoadingSettings(); return true; } @@ -774,6 +779,8 @@ bool saveConfig() iniSetInteger("fogEnd", war_getFogEnd()); iniSetInteger("fogStart", war_getFogStart()); iniSetInteger("terrainShaderQuality", getTerrainShaderQuality()); + iniSetInteger("shadowFilterSize", (int)war_getShadowFilterSize()); + iniSetInteger("shadowMapResolution", (int)war_getShadowMapResolution()); iniSetInteger("configVersion", CURRCONFVERSION); // write out ini file changes diff --git a/src/warzoneconfig.cpp b/src/warzoneconfig.cpp index 87fbeb68cb9..6baf66ec59a 100644 --- a/src/warzoneconfig.cpp +++ b/src/warzoneconfig.cpp @@ -638,7 +638,7 @@ void war_setShadowMapResolution(uint32_t resolution) debug(LOG_ERROR, "Shadow map resolution %" PRIu32 " is unsupported: must be a power of 2", resolution); return; } - if (resolution < 2048 || resolution > 4096) + if (resolution > 0 && (resolution < 2048 || resolution > 4096)) // 0 is a special case that maps to "figure out a decent default for this system" { debug(LOG_INFO, "Shadow map resolution %" PRIu32 " may not have the desired effect", resolution); }