diff options
author | Dave Parks <davep@lindenlab.com> | 2022-12-16 13:57:31 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-12-16 13:57:31 -0600 |
commit | 4711241dd523e64b68ef51e2b9e52a95b04e7034 (patch) | |
tree | 47a969f62023cc7903587b5e03ab4fa5f36d7e03 /indra | |
parent | d0af1ca7cb2174c479139692ed764ccaca92a8d5 (diff) |
SL-18731 Fix for runaway feedback loops on reflection probe ambiance
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llreflectionmapmanager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index 1472abcec2..d9d6341617 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -696,6 +696,7 @@ void LLReflectionMapManager::updateUniforms() LLSettingsSky::ptr_t psky = environment.getCurrentSky(); F32 minimum_ambiance = psky->getTotalReflectionProbeAmbiance(); + F32 ambscale = gCubeSnapshot ? 0.5f : 1.f; for (auto* refmap : mReflectionMaps) { @@ -729,7 +730,7 @@ void LLReflectionMapManager::updateUniforms() rpd.refIndex[count][3] = -rpd.refIndex[count][3]; } - rpd.refParams[count].set(llmax(minimum_ambiance, refmap->getAmbiance()), 0.f, 0.f, 0.f); + rpd.refParams[count].set(llmax(minimum_ambiance, refmap->getAmbiance())*ambscale, 0.f, 0.f, 0.f); S32 ni = nc; // neighbor ("index") - index into refNeighbor to write indices for current reflection probe's neighbors { |