From 577706eddc22cd750c11e2110c79b7ead85e6005 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 12 Jan 2024 00:20:46 +0200 Subject: SL-20629 Fix first opened legacy env displaying probe ambience as '1' --- indra/newview/llenvironment.cpp | 8 ++++++++ indra/newview/llsettingsvo.cpp | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index ffaca846dd..60c2682078 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -895,6 +895,14 @@ void LLEnvironment::initSingleton() gGenericDispatcher.addHandler(MESSAGE_PUSHENVIRONMENT, &environment_push_dispatch_handler); } + gSavedSettings.getControl("RenderSkyAutoAdjustProbeAmbiance")->getSignal()->connect( + [](LLControlVariable*, const LLSD& new_val, const LLSD& old_val) + { + LLSettingsSky::sAutoAdjustProbeAmbiance = new_val.asReal(); + } + ); + LLSettingsSky::sAutoAdjustProbeAmbiance = gSavedSettings.getF32("RenderSkyAutoAdjustProbeAmbiance"); + LLEventPumps::instance().obtain(PUMP_EXPERIENCE).stopListening(LISTENER_NAME); LLEventPumps::instance().obtain(PUMP_EXPERIENCE).listen(LISTENER_NAME, [this](LLSD message) { listenExperiencePump(message); return false; }); } diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index 7009fb98ab..c07c939862 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -739,7 +739,6 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force) static LLCachedControl auto_adjust_blue_horizon_scale(gSavedSettings, "RenderSkyAutoAdjustBlueHorizonScale", 1.f); static LLCachedControl auto_adjust_blue_density_scale(gSavedSettings, "RenderSkyAutoAdjustBlueDensityScale", 1.f); static LLCachedControl auto_adjust_sun_color_scale(gSavedSettings, "RenderSkyAutoAdjustSunColorScale", 1.f); - static LLCachedControl auto_adjust_probe_ambiance(gSavedSettings, "RenderSkyAutoAdjustProbeAmbiance", 1.f); static LLCachedControl sunlight_scale(gSavedSettings, "RenderSkySunlightScale", 1.5f); static LLCachedControl ambient_scale(gSavedSettings, "RenderSkyAmbientScale", 1.5f); @@ -772,8 +771,7 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force) shader->uniform3fv(LLShaderMgr::BLUE_DENSITY, blue_density.mV); shader->uniform3fv(LLShaderMgr::BLUE_HORIZON, blue_horizon.mV); - LLSettingsSky::sAutoAdjustProbeAmbiance = auto_adjust_probe_ambiance; - probe_ambiance = auto_adjust_probe_ambiance; // NOTE -- must match LLSettingsSky::getReflectionProbeAmbiance value for "auto_adjust" true + probe_ambiance = sAutoAdjustProbeAmbiance; } else { -- cgit v1.2.3 From 2c8532bdc7afa8ff380fbae7c2be8300b5ce8214 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 12 Jan 2024 00:22:47 +0200 Subject: SL-20629 Fix Probe ambiance being displayed as 0 when it isn't And hide warning when it's already 0 --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llfloatereditextdaycycle.cpp | 4 +++- indra/newview/llfloaterfixedenvironment.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 00b59f9a4d..8fbeb82d07 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10720,7 +10720,7 @@ Type F32 Value - 0.001 + 0.01 RenderSkySunlightScale diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index bb47feaa95..4e764674e5 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -1724,7 +1724,9 @@ void LLFloaterEditExtDayCycle::showHDRNotification(const LLSettingsDay::ptr_t &p while (iter != end) { LLSettingsSky::ptr_t sky = std::static_pointer_cast(iter->second); - if (sky && sky->canAutoAdjust()) + if (sky + && sky->canAutoAdjust() + && sky->getReflectionProbeAmbiance(true) != 0.f) { LLNotificationsUtil::add("AutoAdjustHDRSky"); return; diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index 8e28fd6234..3e8bad3ef5 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -186,7 +186,8 @@ void LLFloaterFixedEnvironment::setEditSettingsAndUpdate(const LLSettingsBase::p // teach user about HDR settings if (mSettings && mSettings->getSettingsType() == "sky" - && ((LLSettingsSky*)mSettings.get())->canAutoAdjust()) + && ((LLSettingsSky*)mSettings.get())->canAutoAdjust() + && ((LLSettingsSky*)mSettings.get())->getReflectionProbeAmbiance(true) != 0.f) { LLNotificationsUtil::add("AutoAdjustHDRSky"); } -- cgit v1.2.3