Skip to content
Snippets Groups Projects
Commit ad956699 authored by David Parks's avatar David Parks
Browse files

SL-19811 Update fallback probe every 2 seconds to smooth out water cloud updates.

parent 0cb15b08
No related branches found
No related tags found
No related merge requests found
......@@ -10533,7 +10533,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>20.0</real>
<real>2.0</real>
</map>
<key>RenderReflectionProbeLevel</key>
<map>
......
......@@ -323,11 +323,17 @@ void LLReflectionMapManager::update()
mRadiancePass = radiance_pass;
}
static LLCachedControl<F32> sUpdatePeriod(gSavedSettings, "RenderDefaultProbeUpdatePeriod", 20.f);
if (sLevel == 0 &&
gFrameTimeSeconds - mDefaultProbe->mLastUpdateTime < sUpdatePeriod)
{ // when probes are disabled don't update the default probe more often than once every 20 seconds
oldestProbe = nullptr;
static LLCachedControl<F32> sUpdatePeriod(gSavedSettings, "RenderDefaultProbeUpdatePeriod", 2.f);
if ((gFrameTimeSeconds - mDefaultProbe->mLastUpdateTime) < sUpdatePeriod)
{
if (sLevel == 0)
{ // when probes are disabled don't update the default probe more often than the prescribed update period
oldestProbe = nullptr;
}
}
else if (sLevel > 0)
{ // when probes are enabled don't update the default probe less often than the prescribed update period
oldestProbe = mDefaultProbe;
}
// switch to updating the next oldest probe
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment