summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-02-21 18:51:14 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-02-21 18:51:14 +0200
commitc5371bb2715325aa6d705a2fc9973510675e5e59 (patch)
treee10a96c5a9dc1b073c551a09233940e26b33b47d /indra
parent4ac03d49052ab2e75e5c5e4aa7886ebe1e48294e (diff)
SL-12732 Lights not working in some cases
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;