Disabled bloom by default

This commit is contained in:
iChris4 committed 2026-09-10 23:06:46 +02:00
1 parent 715830e89a
commit c4f386724c
2 files changed
+15 -6

No files matched your search

+13 -4
View File
@@ -149,6 +149,13 @@ inline constexpr const char* kPortableUserDataDirectoryName = "UserData";
// installation.
inline constexpr int kPortableSearchDepth = 4;
// Post-processing paths the game is allowed to skip, as a mask of the engine's
// own path bits. Bloom is the only one exposed, and it starts off: its bright
// bleed is the effect that reads worst in a headset, and the F10 bar's tick box
// is the way back to it.
inline constexpr uint32_t kPostProcessingBloomPath = 0x10u;
inline constexpr uint32_t kDisabledPostProcessingPathsDefault = kPostProcessingBloomPath;
// First-person camera defaults and the range its head offsets accept, in one
// place: the config getters, the on-disk template and the F10 bar's reset all
// read them from here, so they cannot drift apart again.
@@ -581,8 +588,8 @@ inline RuntimeUserConfig ParseConfigDocument(const toml::value& document) {
config.textureReplacements = FindConfigValue<bool>(document, "video", "texture_replacements");
config.textureDumps = FindConfigValue<bool>(document, "video", "texture_dumps");
if (auto value = FindConfigUint(document, "video", "disabled_post_processing_paths");
value && (*value & ~0x10u) == 0) {
config.disabledPostProcessingPaths = *value & 0x10u;
value && (*value & ~kPostProcessingBloomPath) == 0) {
config.disabledPostProcessingPaths = *value & kPostProcessingBloomPath;
}
config.vrEnabled = FindConfigValue<bool>(document, "vr", "enabled");
@@ -1207,8 +1214,10 @@ inline bool TextureDumps(bool fallback = false) {
return Get().textureDumps.value_or(fallback);
}
inline uint32_t DisabledPostProcessingPaths(uint32_t fallback = 0) {
return Get().disabledPostProcessingPaths.value_or(fallback) & 0x10u;
// An absent setting means the default mask, not "nothing disabled": a fresh
// install has no [video] section at all and still starts without bloom.
inline uint32_t DisabledPostProcessingPaths(uint32_t fallback = kDisabledPostProcessingPathsDefault) {
return Get().disabledPostProcessingPaths.value_or(fallback) & kPostProcessingBloomPath;
}
inline bool VrEnabled(bool fallback = false) {
+2 -2
View File
@@ -163,7 +163,7 @@ SDL_Scancode g_vrRecenterScancode = [] {
}();
bool g_vrRecenterRebinding = false;
float g_vrLeanBackDegrees = RuntimeConfigFile::VrLeanBackDegrees();
uint32_t g_disabledPostProcessingPaths = RuntimeConfigFile::DisabledPostProcessingPaths(0);
uint32_t g_disabledPostProcessingPaths = RuntimeConfigFile::DisabledPostProcessingPaths();
std::array<int32_t, PAD_MAX_CONTROLLERS> g_configuredControllerIndices = [] {
std::array<int32_t, PAD_MAX_CONTROLLERS> indices{};
indices.fill(std::numeric_limits<int32_t>::min());
@@ -825,7 +825,7 @@ void DrawGraphicsSettings() {
uint32_t flag;
};
static constexpr std::array<EffectFlag, 1> kEffectFlags = {{
{"Disable bloom", 0x10u},
{"Disable bloom", RuntimeConfigFile::kPostProcessingBloomPath},
}};
for (const auto& effect : kEffectFlags) {