diff options
author | Dave Parks <davep@lindenlab.com> | 2023-03-30 13:14:23 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2023-03-30 13:14:23 -0500 |
commit | b5917fbd16022e4c4d2cf7ef41b21fdea4828c9e (patch) | |
tree | 18a73b2df4cd38e051e8455e782b4b45ce9880e1 /indra/newview/llreflectionmapmanager.cpp | |
parent | 9a03c819d430ca8b45f661204f6d666e609e9b51 (diff) |
DRTVWR-559 Reduce probe flashing and exposure flickering.
Diffstat (limited to 'indra/newview/llreflectionmapmanager.cpp')
-rw-r--r-- | indra/newview/llreflectionmapmanager.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index 6828078f4f..e9df67c724 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -181,7 +181,11 @@ void LLReflectionMapManager::update() LLVector4a d; - if (probe->mOccluded) + if (probe->mComplete) + { + probe->mFadeIn = llmin((F32) (probe->mFadeIn + gFrameIntervalSeconds), 1.f); + } + if (probe->mOccluded && probe->mComplete) { if (oldestOccluded == nullptr) { @@ -300,7 +304,7 @@ void LLReflectionMapManager::getReflectionMaps(std::vector<LLReflectionMap*>& ma mProbes[i]->mLastBindTime = gFrameTimeSeconds; // something wants to use this probe, indicate it's been requested if (mProbes[i]->mCubeIndex != -1) { - if (!mProbes[i]->mOccluded) + if (!mProbes[i]->mOccluded && mProbes[i]->mComplete) { mProbes[i]->mProbeIndex = count; maps[count++] = mProbes[i]; @@ -385,6 +389,7 @@ S32 LLReflectionMapManager::allocateCubeIndex() S32 ret = mProbes[i]->mCubeIndex; mProbes[i]->mCubeIndex = -1; mProbes[i]->mCubeArray = nullptr; + mProbes[i]->mComplete = false; return ret; } } @@ -435,6 +440,7 @@ void LLReflectionMapManager::doProbeUpdate() mUpdatingFace = 0; if (isRadiancePass()) { + mUpdatingProbe->mComplete = true; mUpdatingProbe = nullptr; mRadiancePass = false; } @@ -768,7 +774,10 @@ void LLReflectionMapManager::updateUniforms() // for sphere probes, origin (xyz) and radius (w) of refmaps in clip space LLVector4 refSphere[LL_MAX_REFLECTION_PROBE_COUNT]; - // extra parameters (currently only ambiance in .x) + // extra parameters + // x - irradiance scale + // y - radiance scale + // z - fade in LLVector4 refParams[LL_MAX_REFLECTION_PROBE_COUNT]; // indices used by probe: @@ -843,7 +852,7 @@ void LLReflectionMapManager::updateUniforms() rpd.refIndex[count][3] = -rpd.refIndex[count][3]; } - rpd.refParams[count].set(llmax(minimum_ambiance, refmap->getAmbiance())*ambscale, radscale, 0.f, 0.f); + rpd.refParams[count].set(llmax(minimum_ambiance, refmap->getAmbiance())*ambscale, radscale, refmap->mFadeIn, 0.f); S32 ni = nc; // neighbor ("index") - index into refNeighbor to write indices for current reflection probe's neighbors { |