diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-02-06 21:31:34 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-02-06 21:31:34 +0200 |
commit | fa39ff67f081e2e957d2ba7fd9f014747ff10963 (patch) | |
tree | dc67779842f2a670e5c242c07e24d27ec701f8d5 /indra/newview/pipeline.cpp | |
parent | 2076f4af0fc946c3bd79754a1deefc495ee7edb9 (diff) | |
parent | 9a3f1f6a3c4506ae08c7af7f92f11da40d80ef00 (diff) |
Merge branch 'master' into DRTVWR-497
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 4ca34de02e..43a346faee 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 @@ -8690,10 +8690,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; |