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

SL-19150 Fix for stuttering real-time reflection probes.

parent 1962f0b3
No related branches found
No related tags found
2 merge requests!3Update to main branch,!2Rebase onto current main branch
...@@ -206,11 +206,21 @@ void LLReflectionMapManager::update() ...@@ -206,11 +206,21 @@ void LLReflectionMapManager::update()
{ {
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("rmmu - realtime"); LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("rmmu - realtime");
// update the closest dynamic probe realtime // update the closest dynamic probe realtime
// should do a full irradiance pass on "odd" frames and a radiance pass on "even" frames
closestDynamic->autoAdjustOrigin(); closestDynamic->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) for (U32 i = 0; i < 6; ++i)
{ {
updateProbeFace(closestDynamic, i); updateProbeFace(closestDynamic, i);
} }
mRealtimeRadiancePass = !mRealtimeRadiancePass;
// restore "isRadiancePass"
mRadiancePass = radiance_pass;
} }
// switch to updating the next oldest probe // switch to updating the next oldest probe
......
...@@ -169,6 +169,11 @@ class alignas(16) LLReflectionMapManager ...@@ -169,6 +169,11 @@ class alignas(16) LLReflectionMapManager
// This should avoid feedback loops and ensure that the colors in the radiance maps match the colors in the environment. // This should avoid feedback loops and ensure that the colors in the radiance maps match the colors in the environment.
bool mRadiancePass = false; bool mRadiancePass = false;
// same as above, but for the realtime probe.
// Realtime probes should update all six sides of the irradiance map on "odd" frames and all six sides of the
// radiance map on "even" frames.
bool mRealtimeRadiancePass = false;
LLPointer<LLReflectionMap> mDefaultProbe; // default reflection probe to fall back to for pixels with no probe influences (should always be at cube index 0) LLPointer<LLReflectionMap> mDefaultProbe; // default reflection probe to fall back to for pixels with no probe influences (should always be at cube index 0)
// number of reflection probes to use for rendering (based on saved setting RenderReflectionProbeCount) // number of reflection probes to use for rendering (based on saved setting RenderReflectionProbeCount)
......
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