summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-11-28 20:19:51 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-11-29 00:12:27 +0200
commit1b4814f0e5784b3c339328cccde070dc7c20606b (patch)
treef12421c456e534d5fe0f9b69db474228b251f8f8
parent16cc5fc35bc78aeb3043384d46d8a3d9ef580c18 (diff)
viewer#3170 Fix tonemaping slider
At the moment slider is in general settings, not per environment
-rw-r--r--indra/llinventory/llsettingssky.cpp9
-rw-r--r--indra/llinventory/llsettingssky.h2
-rw-r--r--indra/newview/pipeline.cpp10
3 files changed, 9 insertions, 12 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index f773b64bde..17d259a163 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -1180,7 +1180,6 @@ void LLSettingsSky::loadValuesFromLLSD()
mHDRMax = 2.0f;
mHDRMin = 0.5f;
mHDROffset = 1.0f;
- mTonemapMix = 1.0f;
mSunTextureId = settings[SETTING_SUN_TEXTUREID].asUUID();
mMoonTextureId = settings[SETTING_MOON_TEXTUREID].asUUID();
@@ -2056,14 +2055,6 @@ F32 LLSettingsSky::getHDROffset() const
return mHDROffset;
}
-F32 LLSettingsSky::getTonemapMix() const
-{
- if (mCanAutoAdjust)
- return 0.0f;
-
- return mTonemapMix;
-}
-
void LLSettingsSky::setGamma(F32 val)
{
mGamma = val;
diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h
index 8d73c35ff3..f61f8af116 100644
--- a/indra/llinventory/llsettingssky.h
+++ b/indra/llinventory/llsettingssky.h
@@ -212,7 +212,6 @@ public:
F32 getHDRMin() const;
F32 getHDRMax() const;
F32 getHDROffset() const;
- F32 getTonemapMix() const;
void setGamma(F32 val);
@@ -385,7 +384,6 @@ protected:
F32 mCloudVariance;
F32 mCloudShadow;
F32 mCloudScale;
- F32 mTonemapMix;
F32 mHDROffset;
F32 mHDRMax;
F32 mHDRMin;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 3b51cbfbb2..037dfd1d66 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -7152,7 +7152,15 @@ void LLPipeline::tonemap(LLRenderTarget* src, LLRenderTarget* dst)
shader.uniform1i(tonemap_type, tonemap_type_setting);
static LLCachedControl<F32> tonemap_mix_setting(gSavedSettings, "RenderTonemapMix", 1.f);
- shader.uniform1f(tonemap_mix, psky->getTonemapMix());
+ if (psky->canAutoAdjust())
+ {
+ // Legacy skies
+ shader.uniform1f(tonemap_mix, 0.f);
+ }
+ else
+ {
+ shader.uniform1f(tonemap_mix, tonemap_mix_setting());
+ }
mScreenTriangleVB->setBuffer();
mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3);