diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-01-09 10:14:41 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-01-09 10:14:41 +0800 |
commit | f6dec0bf7b9baa990fa26398e77faf5a410b8be6 (patch) | |
tree | 9ed732e6801157018faff52d4782c2688fefdd73 /indra/newview/llreflectionmapmanager.cpp | |
parent | 0fd4a8b59677e1a85d19308379ab9967345749dc (diff) | |
parent | 3c858d7e2d6633df14df473a918d2fb848403972 (diff) |
Merge tag '7.1.2-release'
source for viewer 7.1.2.7215179142
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 14c33b9d8e..73dc75a6c7 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) @@ -1005,10 +1003,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); |