diff options
author | Dave Parks <davep@lindenlab.com> | 2024-12-06 11:42:48 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-06 13:42:48 -0600 |
commit | 5e35785b8d2e782144c5f46ad0c440ded158f88c (patch) | |
tree | a0c6c316047822899bd03b441d590afcc90eb499 /indra/newview/pipeline.cpp | |
parent | 37f92c1698cd0cef1aa3d8a21a13cd99510e86e9 (diff) |
#3219 Revert default exposure thresholds to DeltaFPS values (#3228)
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 4b50b7218e..6c8fe60776 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7077,18 +7077,37 @@ void LLPipeline::generateExposure(LLRenderTarget* src, LLRenderTarget* dst, bool LLSettingsSky::ptr_t sky = LLEnvironment::instance().getCurrentSky(); F32 probe_ambiance = LLEnvironment::instance().getCurrentSky()->getReflectionProbeAmbiance(should_auto_adjust); - F32 exp_min = sky->getHDRMin(); - F32 exp_max = sky->getHDRMax(); - if (dynamic_exposure_enabled) + F32 exp_min = 1.f; + F32 exp_max = 1.f; + + static LLCachedControl<bool> use_exposure_sky_settings(gSavedSettings, "RenderUseExposureSkySettings", false); + + if (use_exposure_sky_settings) { - exp_min = sky->getHDROffset() - exp_min; - exp_max = sky->getHDROffset() + exp_max; + if (dynamic_exposure_enabled) + { + exp_min = sky->getHDROffset() - sky->getHDRMin(); + exp_max = sky->getHDROffset() + sky->getHDRMax(); + } + else + { + exp_min = sky->getHDROffset(); + exp_max = sky->getHDROffset(); + } } - else + else if (dynamic_exposure_enabled) { - exp_min = sky->getHDROffset(); - exp_max = sky->getHDROffset(); + if (probe_ambiance > 0.f) + { + F32 hdr_scale = sqrtf(LLEnvironment::instance().getCurrentSky()->getGamma()) * 2.f; + + if (hdr_scale > 1.f) + { + exp_min = 1.f / hdr_scale; + exp_max = hdr_scale; + } + } } shader->uniform1f(dt, gFrameIntervalSeconds); |