From 5e35785b8d2e782144c5f46ad0c440ded158f88c Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 6 Dec 2024 11:42:48 -0800 Subject: #3219 Revert default exposure thresholds to DeltaFPS values (#3228) --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/pipeline.cpp | 35 +++++++++++++++++++++++++-------- 2 files changed, 38 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f0ba6eff95..6d6a52a77f 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9298,6 +9298,17 @@ Value 4.0 + RenderUseExposureSkySettings + + Comment + Use exposure sky settings instead of deriving from HDR scale. + Persist + 0 + Type + Boolean + Value + 0 + RenderDynamicExposureCoefficient Comment diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 4b50b7218e..6c8fe60776 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7077,18 +7077,37 @@ void LLPipeline::generateExposure(LLRenderTarget* src, LLRenderTarget* dst, bool LLSettingsSky::ptr_t sky = LLEnvironment::instance().getCurrentSky(); F32 probe_ambiance = LLEnvironment::instance().getCurrentSky()->getReflectionProbeAmbiance(should_auto_adjust); - F32 exp_min = sky->getHDRMin(); - F32 exp_max = sky->getHDRMax(); - if (dynamic_exposure_enabled) + F32 exp_min = 1.f; + F32 exp_max = 1.f; + + static LLCachedControl use_exposure_sky_settings(gSavedSettings, "RenderUseExposureSkySettings", false); + + if (use_exposure_sky_settings) { - exp_min = sky->getHDROffset() - exp_min; - exp_max = sky->getHDROffset() + exp_max; + if (dynamic_exposure_enabled) + { + exp_min = sky->getHDROffset() - sky->getHDRMin(); + exp_max = sky->getHDROffset() + sky->getHDRMax(); + } + else + { + exp_min = sky->getHDROffset(); + exp_max = sky->getHDROffset(); + } } - else + else if (dynamic_exposure_enabled) { - exp_min = sky->getHDROffset(); - exp_max = sky->getHDROffset(); + if (probe_ambiance > 0.f) + { + F32 hdr_scale = sqrtf(LLEnvironment::instance().getCurrentSky()->getGamma()) * 2.f; + + if (hdr_scale > 1.f) + { + exp_min = 1.f / hdr_scale; + exp_max = hdr_scale; + } + } } shader->uniform1f(dt, gFrameIntervalSeconds); -- cgit v1.2.3 From 412b3db5a877eab977346e3f30464d5745afd69b Mon Sep 17 00:00:00 2001 From: Brad Linden <46733234+brad-linden@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:35:47 -0800 Subject: Remove unwanted notification for texture downrezing behavior (#3233) secondlife/viewer#2549 --- indra/newview/llviewertexture.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 14647d6f84..36b6787ace 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -582,31 +582,9 @@ void LLViewerTexture::updateClass() { if (!was_backgrounded) { - std::string notification_name; - std::string setting; - if (is_minimized) - { - notification_name = "TextureDiscardMinimized"; - setting = "TextureDiscardMinimizedTime"; - } - else - { - notification_name = "TextureDiscardBackgrounded"; - setting = "TextureDiscardBackgroundedTime"; - } - LL_INFOS() << "Viewer was " << (is_minimized ? "minimized" : "backgrounded") << " for " << discard_time << "s, freeing up video memory." << LL_ENDL; - LLNotificationsUtil::add(notification_name, llsd::map("DELAY", discard_time), LLSD(), - [=](const LLSD& notification, const LLSD& response) - { - if (response["Cancel_okcancelignore"].asBoolean()) - { - LL_INFOS() << "User chose to disable texture discard on " << (is_minimized ? "minimizing." : "backgrounding.") << LL_ENDL; - gSavedSettings.setF32(setting, -1.f); - } - }); last_desired_discard_bias = sDesiredDiscardBias; was_backgrounded = true; } -- cgit v1.2.3 From c162d8a060e9b48a7945eb0b1bdafbff959b7faf Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 9 Dec 2024 20:18:37 +0200 Subject: #3222 Emoji tabs losing symbols --- indra/llui/lluistring.cpp | 6 ++++++ indra/llui/lluistring.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/lluistring.cpp b/indra/llui/lluistring.cpp index bfadeb8428..ab6de16639 100644 --- a/indra/llui/lluistring.cpp +++ b/indra/llui/lluistring.cpp @@ -47,6 +47,12 @@ void LLUIString::assign(const std::string& s) dirty(); } +void LLUIString::assign(const LLWString& instring) +{ + mOrig = wstring_to_utf8str(instring); + dirty(); +} + void LLUIString::setArgList(const LLStringUtil::format_map_t& args) { diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h index b9d4ff0ebb..2512634004 100644 --- a/indra/llui/lluistring.h +++ b/indra/llui/lluistring.h @@ -61,10 +61,11 @@ public: LLUIString() : mArgs(NULL), mNeedsResult(false), mNeedsWResult(false) {} LLUIString(const std::string& instring, const LLStringUtil::format_map_t& args); LLUIString(const std::string& instring) : mArgs(NULL) { assign(instring); } - LLUIString(const LLWString& instring) : mArgs(NULL) { insert(0, instring); } + LLUIString(const LLWString& instring) : mArgs(NULL) { assign(instring); } ~LLUIString() { delete mArgs; } void assign(const std::string& instring); + void assign(const LLWString& instring); LLUIString& operator=(const std::string& s) { assign(s); return *this; } void setArgList(const LLStringUtil::format_map_t& args); -- cgit v1.2.3