Remove doHeroProbeUpdate

DRTVWR-583
master
Jonathan "Geenz" Goodman 2023-06-29 17:35:24 -04:00
parent 5ade456ee7
commit 53b2efd131
2 changed files with 23 additions and 39 deletions

View File

@ -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);
}

View File

@ -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);