diff options
-rw-r--r-- | indra/newview/llreflectionmapmanager.cpp | 60 | ||||
-rw-r--r-- | indra/newview/llreflectionmapmanager.h | 2 |
2 files changed, 23 insertions, 39 deletions
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index 783ff69073..fe3ea15352 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -329,6 +329,28 @@ void LLReflectionMapManager::update() // restore "isRadiancePass" mRadiancePass = radiance_pass; } + + + { + LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("rmmu - realtime"); + // update the closest dynamic probe realtime + // should do a full irradiance pass on "odd" frames and a radiance pass on "even" frames + mHeroProbe->autoAdjustOrigin(); + + // store and override the value of "isRadiancePass" -- parts of the render pipe rely on "isRadiancePass" to set + // lighting values etc + bool radiance_pass = isRadiancePass(); + mRadiancePass = mRealtimeRadiancePass; + for (U32 i = 0; i < 6; ++i) + { + updateProbeFace(mHeroProbe, i, mHeroProbeResolution, mHeroArray); + } + + mRealtimeRadiancePass = !mRealtimeRadiancePass; + + // restore "isRadiancePass" + mRadiancePass = radiance_pass; + } static LLCachedControl<F32> sUpdatePeriod(gSavedSettings, "RenderDefaultProbeUpdatePeriod", 2.f); if ((gFrameTimeSeconds - mDefaultProbe->mLastUpdateTime) < sUpdatePeriod) @@ -361,28 +383,6 @@ void LLReflectionMapManager::update() oldestOccluded->autoAdjustOrigin(); oldestOccluded->mLastUpdateTime = gFrameTimeSeconds; } - - if (mHeroProbe != nullptr) - { - LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("rmmu - realtime"); - // update the closest dynamic probe realtime - // should do a full irradiance pass on "odd" frames and a radiance pass on "even" frames - mHeroProbe->autoAdjustOrigin(); - - // store and override the value of "isRadiancePass" -- parts of the render pipe rely on "isRadiancePass" to set - // lighting values etc - bool radiance_pass = isRadiancePass(); - mRadiancePass = mRealtimeRadiancePass; - for (U32 i = 0; i < 6; ++i) - { - updateProbeFace(mHeroProbe, i, mProbeResolution, mHeroArray); - } - mRealtimeRadiancePass = !mRealtimeRadiancePass; - - // restore "isRadiancePass" - mRadiancePass = radiance_pass; - } - } LLReflectionMap* LLReflectionMapManager::addProbe(LLSpatialGroup* group) @@ -576,21 +576,6 @@ void LLReflectionMapManager::doProbeUpdate() } } -void LLReflectionMapManager::doHeroProbeUpdate() -{ - LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY; - llassert(mHeroProbe != nullptr); - - touch_default_probe(mHeroProbe); - - for (int i = 0; i < 6; i++) - { - gPipeline.mRT = &gPipeline.mAuxillaryRT; - mHeroProbe->update(mHeroProbeResolution, i); - gPipeline.mRT = &gPipeline.mMainRT; - } -} - // Do the reflection map update render passes. // For every 12 calls of this function, one complete reflection probe radiance map and irradiance map is generated // First six passes render the scene with direct lighting only into a scratch space cube map at the end of the cube map array and generate @@ -1190,6 +1175,7 @@ void LLReflectionMapManager::setUniforms() updateUniforms(); } glBindBufferBase(GL_UNIFORM_BUFFER, 1, mUBO); + glBindBufferBase(GL_UNIFORM_BUFFER, 1, mHeroUBO); } diff --git a/indra/newview/llreflectionmapmanager.h b/indra/newview/llreflectionmapmanager.h index 1275617e0a..81b0ef8ed8 100644 --- a/indra/newview/llreflectionmapmanager.h +++ b/indra/newview/llreflectionmapmanager.h @@ -146,8 +146,6 @@ private: // perform an update on the currently updating Probe void doProbeUpdate(); - - void doHeroProbeUpdate(); // update the specified face of the specified probe void updateProbeFace(LLReflectionMap* probe, U32 face, U32 probeResolution, LLPointer<LLCubeMapArray> cubeArray); |