Fix for legacy skies with bright suns not matching FS 6.6.17 (#3214)

meow-7.2.2
Dave Parks 2024-12-05 13:10:13 -08:00 committed by GitHub
parent 1120a7ccb9
commit 37f92c1698
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 3 deletions

View File

@ -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);
}
}
}

View File

@ -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;

View File

@ -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)