From 5b832291a8ea1f100e2caaffef3d162dd96bee50 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Fri, 30 Aug 2024 12:49:05 -0700 Subject: Introduce Khronos Neutral tonemapper as new default along with debug options to control tonemap mix (#2464) (#2468) --- indra/newview/pipeline.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 91ade0eef1..3b1da8668b 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7087,10 +7087,16 @@ void LLPipeline::tonemap(LLRenderTarget* src, LLRenderTarget* dst) F32 e = llclamp(exposure(), 0.5f, 4.f); static LLStaticHashedString s_exposure("exposure"); - static LLStaticHashedString aces_mix("aces_mix"); + static LLStaticHashedString tonemap_mix("tonemap_mix"); + static LLStaticHashedString tonemap_type("tonemap_type"); shader.uniform1f(s_exposure, e); - shader.uniform1f(aces_mix, gEXRImage.notNull() ? 0.f : 0.3f); + + static LLCachedControl tonemap_type_setting(gSavedSettings, "RenderTonemapType", 0U); + shader.uniform1i(tonemap_type, tonemap_type_setting); + + static LLCachedControl tonemap_mix_setting(gSavedSettings, "RenderTonemapMix", 1.f); + shader.uniform1f(tonemap_mix, tonemap_mix_setting); mScreenTriangleVB->setBuffer(); mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3); -- cgit v1.2.3