diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-01-08 21:33:06 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-01-08 21:33:06 +0200 |
commit | afe91b7eb68da65687beef451bd094ff0091b717 (patch) | |
tree | 5bdb9e5b5a78a16a8c1362c33717a6931fb40458 /indra/newview/llreflectionmapmanager.cpp | |
parent | 6e6df8c31e09e6ba69156150ecd37cc4ac4ea0e6 (diff) | |
parent | 77395eddc911e0801e50fd693f7bbaee8046aa95 (diff) |
Merge main (DRTVWR-596 GLTF Materials Maint) into DRTVWR-591-maint-X
# Conflicts:
# indra/newview/VIEWER_VERSION.txt
Diffstat (limited to 'indra/newview/llreflectionmapmanager.cpp')
-rw-r--r-- | indra/newview/llreflectionmapmanager.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index 72f7e23b0c..69674417c1 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -252,14 +252,12 @@ void LLReflectionMapManager::update() continue; } - if (probe != mDefaultProbe && + if (probe != mDefaultProbe && (!probe->isRelevant() || mPaused)) { // skip irrelevant probes (or all non-default probes if paused) continue; } - - LLVector4a d; if (probe != mDefaultProbe) @@ -999,10 +997,21 @@ void LLReflectionMapManager::updateUniforms() llassert(refmap->mCubeIndex >= 0); // should always be true, if not, getReflectionMaps is bugged { - if (refmap->mViewerObject) + if (refmap->mViewerObject && refmap->mViewerObject->getVolume()) { // have active manual probes live-track the object they're associated with - refmap->mOrigin.load3(refmap->mViewerObject->getPositionAgent().mV); - refmap->mRadius = refmap->mViewerObject->getScale().mV[0] * 0.5f; + LLVOVolume* vobj = (LLVOVolume*)refmap->mViewerObject; + + refmap->mOrigin.load3(vobj->getPositionAgent().mV); + + if (vobj->getReflectionProbeIsBox()) + { + LLVector3 s = vobj->getScale().scaledVec(LLVector3(0.5f, 0.5f, 0.5f)); + refmap->mRadius = s.magVec(); + } + else + { + refmap->mRadius = refmap->mViewerObject->getScale().mV[0] * 0.5f; + } } modelview.affineTransform(refmap->mOrigin, oa); |