summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-02-11 00:56:15 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-02-11 00:56:15 +0200
commitec3d63cbf8d64d935f5660d8ae5a0f856627964c (patch)
tree3199eb90e34a4f74b9a2913e2b435723b1ec3371 /indra/newview/pipeline.cpp
parentee3ae8cb4abcb8e738d434fe15b97c628d6ca815 (diff)
parent2998552f3d7447da316afdd1713595528596a0c5 (diff)
Merge branch 'master' into DRTVWR-486
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index bd73c234a6..bec33790bd 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -973,7 +973,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
mDeferredLight.release();
}
- F32 scale = RenderShadowResolutionScale;
+ F32 scale = llmax(0.f, RenderShadowResolutionScale);
if (shadow_detail > 0)
{ //allocate 4 sun shadow maps
@@ -8685,10 +8685,24 @@ void LLPipeline::renderDeferredLighting()
}
const LLViewerObject *vobj = drawablep->getVObj();
- if(vobj && vobj->getAvatar()
- && (vobj->getAvatar()->isTooComplex() || vobj->getAvatar()->isInMuteList()))
+ if (vobj)
{
- continue;
+ 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;
+ }
+ }
}
LLVector4a center;
@@ -11434,7 +11448,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- if (LLViewerObject* attached_object = (*attachment_iter))
+ if (LLViewerObject* attached_object = attachment_iter->get())
{
markVisible(attached_object->mDrawable->getSpatialBridge(), *viewer_camera);
}