From 1b4814f0e5784b3c339328cccde070dc7c20606b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 28 Nov 2024 20:19:51 +0200 Subject: viewer#3170 Fix tonemaping slider At the moment slider is in general settings, not per environment --- indra/newview/pipeline.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/newview') 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 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); -- cgit v1.2.3