diff options
author | Dave Parks <davep@lindenlab.com> | 2022-06-10 16:36:38 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-06-10 16:36:38 -0500 |
commit | 929abcd296199ab4ed7a0b08166e284502f7b8df (patch) | |
tree | 900f2a485cce2763a9c7603127fa6380d7ecafb6 /indra/newview/llreflectionmapmanager.cpp | |
parent | 5eb6591d0a5252f0bdd1db9ef551a526099b5a99 (diff) |
SL-17523 Add reflection probe ambiance to windlight settings and integrate with UI and ReflectionMapManager
Diffstat (limited to 'indra/newview/llreflectionmapmanager.cpp')
-rw-r--r-- | indra/newview/llreflectionmapmanager.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index dc733687c3..48ed22d79f 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -33,6 +33,7 @@ #include "pipeline.h" #include "llviewershadermgr.h" #include "llviewercontrol.h" +#include "llenvironment.h" extern BOOL gCubeSnapshot; extern BOOL gTeleportDisplay; @@ -559,6 +560,11 @@ void LLReflectionMapManager::updateUniforms() S32 count = 0; U32 nc = 0; // neighbor "cursor" - index into refNeighbor to start writing the next probe's list of neighbors + LLEnvironment& environment = LLEnvironment::instance(); + LLSettingsSky::ptr_t psky = environment.getCurrentSky(); + + F32 minimum_ambiance = psky->getReflectionProbeAmbiance(); + for (auto* refmap : mReflectionMaps) { if (refmap == nullptr) @@ -591,7 +597,7 @@ void LLReflectionMapManager::updateUniforms() rpd.refIndex[count][3] = -rpd.refIndex[count][3]; } - rpd.refParams[count].set(refmap->getAmbiance(), 0.f, 0.f, 0.f); + rpd.refParams[count].set(llmax(minimum_ambiance, refmap->getAmbiance()), 0.f, 0.f, 0.f); S32 ni = nc; // neighbor ("index") - index into refNeighbor to write indices for current reflection probe's neighbors { |