summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-04-20 22:20:16 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-04-20 22:20:16 +0300
commit231b51f40fd1541ba33377690989fcd49d338451 (patch)
tree9dc351c308171104f754d0b6399b73faf3d83bf4 /indra/newview/pipeline.cpp
parentd9783adba73cce9a68fde4ba0ba78add28da4279 (diff)
Restored SL-12732 after merge conflict
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp37
1 files changed, 16 insertions, 21 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index f0ed303f66..01438bfb9f 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8740,29 +8740,24 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target)
}
}
- const LLViewerObject *vobj = drawablep->getVObj();
- if (vobj)
- {
- LLVOAvatar *av = vobj->getAvatar();
- if (av)
- {
- if (av->isTooComplex() || av->isInMuteList() || dist_vec(av->getPosition(), LLViewerCamera::getInstance()->getOrigin()) > RenderFarClip)
- {
- continue;
- }
- }
- else
- {
- const LLViewerObject *root_obj = drawablep->getParent() ? drawablep->getParent()->getVObj() : vobj;
- if (root_obj && dist_vec(root_obj->getPosition(), LLViewerCamera::getInstance()->getOrigin()) > RenderFarClip)
- {
- continue;
- }
- }
- }
+ const LLViewerObject *vobj = drawablep->getVObj();
+ if (vobj)
+ {
+ LLVOAvatar *av = vobj->getAvatar();
+ if (av && (av->isTooComplex() || av->isInMuteList()))
+ {
+ continue;
+ }
+ }
+
+ const LLVector3 position = drawablep->getPositionAgent();
+ if (dist_vec(position, LLViewerCamera::getInstance()->getOrigin()) > RenderFarClip + volume->getLightRadius())
+ {
+ continue;
+ }
LLVector4a center;
- center.load3(drawablep->getPositionAgent().mV);
+ center.load3(position.mV);
const F32* c = center.getF32ptr();
F32 s = volume->getLightRadius()*1.5f;