diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index de74f2700a5b3ca02ae3e5a0015c08f754252cf0..5b814f03cb9dfba2e93a2f8ec483ee79f0d6e914 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -992,7 +992,7 @@ 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::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/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl index 34ac0c62dce7da59635a2a9323ac6ec49fcf499e..55e1411be2a4eb4a2cea649ae85e6bd19ea1ba8e 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl @@ -169,7 +169,9 @@ void calcAtmosphericVarsLinear(vec3 inPositionEye, vec3 norm, vec3 light_dir, ou // multiply by 2 to get same colors as when the "scaleSoftClip" implementation was doubling color values // (allows for mixing of light sources other than sunlight e.g. reflection probes) sunlit *= 2.0; - amblit *= 2.0; + + // squash ambient to approximate whatever weirdness legacy atmospherics were doing + amblit = ambient_color * 0.5; amblit *= ambientLighting(norm, light_dir); amblit = srgb_to_linear(amblit); diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index 61d87564901923661872f0bc85135a52a8fc35e2..90c4436a040d770a956561000c3ae48932b5df64 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -815,7 +815,7 @@ void LLReflectionMapManager::updateUniforms() F32 ambscale = gCubeSnapshot && !isRadiancePass() ? 0.f : 1.f; F32 radscale = gCubeSnapshot && !isRadiancePass() ? 0.5f : 1.f; - + for (auto* refmap : mReflectionMaps) { if (refmap == nullptr) diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index ac5bde7b9b4704392c4468dc10dddddd60f6459c..a609c98d616a53286556bf36552d9337608903ee 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -675,7 +675,7 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force) LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; LLVector3 light_direction = LLVector3(LLEnvironment::instance().getClampedLightNorm().mV); - bool radiance_pass = gCubeSnapshot && !gPipeline.mReflectionMapManager.isRadiancePass(); + bool irradiance_pass = gCubeSnapshot && !gPipeline.mReflectionMapManager.isRadiancePass(); LLShaderUniforms* shader = &((LLShaderUniforms*)ptarget)[LLGLSLShader::SG_DEFAULT]; { @@ -716,7 +716,7 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force) LLColor3 ambient(getTotalAmbient()); - if (radiance_pass) + if (irradiance_pass) { // during an irradiance map update, disable ambient lighting (direct lighting only) and desaturate sky color (avoid tinting the world blue) shader->uniform3fv(LLShaderMgr::AMBIENT_LINEAR, LLVector3::zero.mV); shader->uniform3fv(LLShaderMgr::AMBIENT, LLVector3::zero.mV);