summaryrefslogtreecommitdiff
path: root/indra/newview/llsettingsvo.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-11-26 12:05:25 +0800
committerErik Kundiman <erik@megapahit.org>2024-11-26 12:05:25 +0800
commita40795bd6ffcfff71bead4869d79cf5a73d5a7af (patch)
tree6c4c1fbb421f737c0b62fcda51ca7ca0ce8294f4 /indra/newview/llsettingsvo.cpp
parent30842e230e2b3d365e8415f0350f8d10ce8b0637 (diff)
parentd65fb7cec8ce36ce7f6ff082f8d04bdd8bc0208c (diff)
Merge remote-tracking branch 'secondlife/release/2024.09-ExtraFPS' into 2024.09-ExtraFPS
Diffstat (limited to 'indra/newview/llsettingsvo.cpp')
-rw-r--r--indra/newview/llsettingsvo.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index fee0bbcda4..b1bef4c4d8 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -794,6 +794,7 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
F32 g = getGamma();
+ static LLCachedControl<bool> hdr(gSavedSettings, "RenderHDREnabled");
static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", true);
static LLCachedControl<F32> auto_adjust_ambient_scale(gSavedSettings, "RenderSkyAutoAdjustAmbientScale", 0.75f);
static LLCachedControl<F32> auto_adjust_hdr_scale(gSavedSettings, "RenderSkyAutoAdjustHDRScale", 2.f);
@@ -801,10 +802,15 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
static LLCachedControl<F32> auto_adjust_blue_density_scale(gSavedSettings, "RenderSkyAutoAdjustBlueDensityScale", 1.f);
static LLCachedControl<F32> auto_adjust_sun_color_scale(gSavedSettings, "RenderSkyAutoAdjustSunColorScale", 1.f);
static LLCachedControl<F32> sunlight_scale(gSavedSettings, "RenderSkySunlightScale", 1.5f);
+ static LLCachedControl<F32> sunlight_hdr_scale(gSavedSettings, "RenderHDRSkySunlightScale", 1.5f);
static LLCachedControl<F32> ambient_scale(gSavedSettings, "RenderSkyAmbientScale", 1.5f);
- shader->uniform1f(LLShaderMgr::SKY_SUNLIGHT_SCALE, sunlight_scale);
+ // sky is a "classic" sky following pre SL 7.0 shading
+ bool classic_mode = psky->canAutoAdjust();
+
+ shader->uniform1f(LLShaderMgr::SKY_SUNLIGHT_SCALE, hdr ? sunlight_hdr_scale : sunlight_scale);
shader->uniform1f(LLShaderMgr::SKY_AMBIENT_SCALE, ambient_scale);
+ shader->uniform1i(LLShaderMgr::CLASSIC_MODE, classic_mode);
F32 probe_ambiance = getReflectionProbeAmbiance();