diff options
author | Rye Mutt <rye@lindenlab.com> | 2024-08-30 12:49:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-30 14:49:05 -0500 |
commit | 5b832291a8ea1f100e2caaffef3d162dd96bee50 (patch) | |
tree | f101fad72d8641aeb3aa2c018012b1c8adc236f4 /indra/newview/pipeline.cpp | |
parent | 7ab6144c0046338053019283f1f1ed75575b3496 (diff) |
Introduce Khronos Neutral tonemapper as new default along with debug options to control tonemap mix (#2464) (#2468)
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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<U32> tonemap_type_setting(gSavedSettings, "RenderTonemapType", 0U); + shader.uniform1i(tonemap_type, tonemap_type_setting); + + static LLCachedControl<F32> tonemap_mix_setting(gSavedSettings, "RenderTonemapMix", 1.f); + shader.uniform1f(tonemap_mix, tonemap_mix_setting); mScreenTriangleVB->setBuffer(); mScreenTriangleVB->drawArrays(LLRender::TRIANGLES, 0, 3); |