summaryrefslogtreecommitdiff
path: root/indra/newview/llheroprobemanager.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2024-04-10 15:21:59 -0700
committerGitHub <noreply@github.com>2024-04-10 15:21:59 -0700
commit7ef2b43802da07b8f30b455448cb84bd1c26320d (patch)
tree17848a13b12929c35fa6a2b84442c0584286aabd /indra/newview/llheroprobemanager.cpp
parent720f7d7ef5d06366cdbae51cd67a6883e994880b (diff)
Multiple fixes for mirrors. (#1192)
* #1064 Fix for mirror surfaces going black when the roughness is set too high. * #1130 Fix for the user's avatar not appearing in mouselook in a mirror. * #1059 Disable mirrors on low settings per the feature table. * #860 Modify the settings UI to better reflect that we only have two AA modes: off and FXAA. * #1191 Add some settings for mirrors in preferences. * #1185 Add support for runtime mirror resolution changing. Useful for quality settings, and auto-FPS.
Diffstat (limited to 'indra/newview/llheroprobemanager.cpp')
-rw-r--r--indra/newview/llheroprobemanager.cpp30
1 files changed, 24 insertions, 6 deletions
diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp
index 13c12b5e55..dd29b416fb 100644
--- a/indra/newview/llheroprobemanager.cpp
+++ b/indra/newview/llheroprobemanager.cpp
@@ -64,6 +64,14 @@ LLHeroProbeManager::LLHeroProbeManager()
{
}
+LLHeroProbeManager::~LLHeroProbeManager()
+{
+ cleanup();
+
+ mHeroVOList.clear();
+ mNearestHero = nullptr;
+}
+
// helper class to seed octree with probes
void LLHeroProbeManager::update()
{
@@ -84,8 +92,7 @@ void LLHeroProbeManager::update()
if (!mRenderTarget.isComplete())
{
U32 color_fmt = GL_RGBA16F;
- U32 targetRes = mProbeResolution; // super sample
- mRenderTarget.allocate(targetRes, targetRes, color_fmt, true);
+ mRenderTarget.allocate(mProbeResolution, mProbeResolution, color_fmt, true);
}
if (mMipChain.empty())
@@ -472,12 +479,19 @@ void LLHeroProbeManager::renderDebug()
gDebugProgram.unbind();
}
+
void LLHeroProbeManager::initReflectionMaps()
{
U32 count = LL_MAX_HERO_PROBE_COUNT;
- if (mTexture.isNull() || mReflectionProbeCount != count || mReset)
+ if ((mTexture.isNull() || mReflectionProbeCount != count || mReset) && LLPipeline::RenderMirrors)
{
+
+ if (mReset)
+ {
+ cleanup();
+ }
+
mReset = false;
mReflectionProbeCount = count;
mProbeResolution = gSavedSettings.getS32("RenderHeroProbeResolution");
@@ -546,9 +560,8 @@ void LLHeroProbeManager::cleanup()
mDefaultProbe = nullptr;
mUpdatingProbe = nullptr;
-
- mHeroVOList.clear();
- mNearestHero = nullptr;
+ /*
+ */
}
void LLHeroProbeManager::doOcclusion()
@@ -565,6 +578,11 @@ void LLHeroProbeManager::doOcclusion()
}
}
+void LLHeroProbeManager::reset()
+{
+ mReset = true;
+}
+
bool LLHeroProbeManager::registerViewerObject(LLVOVolume* drawablep)
{
llassert(drawablep != nullptr);