summaryrefslogtreecommitdiff
path: root/indra/newview
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 /indra/newview
parent16cc5fc35bc78aeb3043384d46d8a3d9ef580c18 (diff)
viewer#3170 Fix tonemaping slider
At the moment slider is in general settings, not per environment
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/pipeline.cpp10
1 files changed, 9 insertions, 1 deletions
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);