summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2024-12-05 13:10:13 -0800
committerGitHub <noreply@github.com>2024-12-05 15:10:13 -0600
commit37f92c1698cd0cef1aa3d8a21a13cd99510e86e9 (patch)
tree97fd603c0b3e5c9bf951d47395e33362b1cd7cc1
parent1120a7ccb91223df91aa92b1354dfe2c3b65a577 (diff)
Fix for legacy skies with bright suns not matching FS 6.6.17 (#3214)
-rw-r--r--indra/llrender/llrender.cpp11
-rw-r--r--indra/llrender/llrender.h1
-rw-r--r--indra/newview/llsettingsvo.cpp2
3 files changed, 11 insertions, 3 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index eb2cd560a6..1d53850f74 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -70,6 +70,7 @@ U32 LLTexUnit::sWhiteTexture = 0;
bool LLRender::sGLCoreProfile = false;
bool LLRender::sNsightDebugSupport = false;
LLVector2 LLRender::sUIGLScaleFactor = LLVector2(1.f, 1.f);
+bool LLRender::sClassicMode = false;
struct LLVBCache
{
@@ -972,9 +973,13 @@ void LLRender::syncLightState()
shader->uniform3fv(LLShaderMgr::LIGHT_DIFFUSE, LL_NUM_LIGHT_UNITS, diffuse[0].mV);
shader->uniform3fv(LLShaderMgr::LIGHT_AMBIENT, 1, mAmbientLightColor.mV);
shader->uniform1i(LLShaderMgr::SUN_UP_FACTOR, sun_primary[0] ? 1 : 0);
- //shader->uniform3fv(LLShaderMgr::AMBIENT, 1, mAmbientLightColor.mV);
- //shader->uniform3fv(LLShaderMgr::SUNLIGHT_COLOR, 1, diffuse[0].mV);
- //shader->uniform3fv(LLShaderMgr::MOONLIGHT_COLOR, 1, diffuse_b[0].mV);
+
+ if (sClassicMode)
+ {
+ shader->uniform3fv(LLShaderMgr::AMBIENT, 1, mAmbientLightColor.mV);
+ shader->uniform3fv(LLShaderMgr::SUNLIGHT_COLOR, 1, diffuse[0].mV);
+ shader->uniform3fv(LLShaderMgr::MOONLIGHT_COLOR, 1, diffuse_b[0].mV);
+ }
}
}
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index fc7c5ccc18..7b6bd4198b 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -489,6 +489,7 @@ public:
static bool sGLCoreProfile;
static bool sNsightDebugSupport;
static LLVector2 sUIGLScaleFactor;
+ static bool sClassicMode; // classic sky mode active
private:
friend class LLLightState;
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 25df53fe05..85e2f4db90 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -818,6 +818,8 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
shader->uniform1f(LLShaderMgr::SKY_AMBIENT_SCALE, ambient_scale);
shader->uniform1i(LLShaderMgr::CLASSIC_MODE, classic_mode);
+ LLRender::sClassicMode = classic_mode;
+
F32 probe_ambiance = getReflectionProbeAmbiance();
if (irradiance_pass)