summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-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 bec33790bd..dcf435f78f 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8684,29 +8684,24 @@ void LLPipeline::renderDeferredLighting()
}
}
- 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;