summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2020-10-19 16:10:30 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2020-10-19 16:10:30 +0100
commitb6b3e30df3c3990c41d7091ae25d456b3bc806a2 (patch)
treea5caa2191bf04ff017205d2407088d54845d5102 /indra/newview
parent96f4571f4c8c22c938f349ca1dc4728d49ba3353 (diff)
parent9618df484b7659ed84285a9c16939b384dbe616c (diff)
merge
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lldrawable.cpp5
-rw-r--r--indra/newview/lldrawpoolavatar.cpp4
-rw-r--r--indra/newview/llvoavatar.cpp19
-rw-r--r--indra/newview/llvoavatar.h4
-rw-r--r--indra/newview/pipeline.cpp9
-rw-r--r--indra/newview/pipeline.h1
6 files changed, 21 insertions, 21 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 2219f20272..c65cfe91be 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -1485,7 +1485,7 @@ void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>*
LLVOAvatar* avatarp = (LLVOAvatar*) objparent;
if (avatarp->isVisible())
{
- impostor = objparent->isAvatar() && ((LLVOAvatar*) objparent)->isImpostor();
+ impostor = objparent->isAvatar() && !LLPipeline::sImpostorRenderAVVO && ((LLVOAvatar*) objparent)->isImpostor();
loaded = objparent->isAvatar() && ((LLVOAvatar*) objparent)->isFullyLoaded();
}
else
@@ -1569,7 +1569,8 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
if (mDrawable->getVObj())
{
- if (mDrawable->getVObj()->isAttachment())
+ // Don't update if we are part of impostor, unles it's an impostor pass
+ if (!LLPipeline::sImpostorRenderAVVO && mDrawable->getVObj()->isAttachment())
{
LLDrawable* parent = mDrawable->getParent();
if (parent && parent->getVObj())
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 11f7809574..8abec252a1 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -574,7 +574,7 @@ void LLDrawPoolAvatar::renderShadow(S32 pass)
return;
}
LLVOAvatar::AvatarOverallAppearance oa = avatarp->getOverallAppearance();
- BOOL impostor = avatarp->isImpostor();
+ BOOL impostor = !LLPipeline::sImpostorRenderAVVO && avatarp->isImpostor();
if (oa == LLVOAvatar::AOA_INVISIBLE ||
(impostor && oa == LLVOAvatar::AOA_JELLYDOLL))
{
@@ -1511,7 +1511,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
return;
}
- BOOL impostor = avatarp->isImpostor() && !single_avatar;
+ BOOL impostor = !LLPipeline::sImpostorRenderAVVO && avatarp->isImpostor() && !single_avatar;
if (( avatarp->isInMuteList()
|| impostor
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 4e5f868c48..6ade882258 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2776,10 +2776,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
BOOL visible = isVisible() || mNeedsAnimUpdate;
// update attachments positions
- // FIXME what does sUseImpostors do
- // here? Shouldn't behavior be based on state of this avatar,
- // rather than some piece of global state?
- if (detailed_update || !sUseImpostors)
+ if (detailed_update)
{
LL_RECORD_BLOCK_TIME(FTM_ATTACHMENT_UPDATE);
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
@@ -3624,7 +3621,7 @@ bool LLVOAvatar::isVisuallyMuted()
{
muted = true;
}
- else
+ else if (sUseImpostors)
{
muted = isTooComplex();
}
@@ -4011,7 +4008,7 @@ void LLVOAvatar::computeUpdatePeriod()
&& isVisible()
&& (!isSelf() || visually_muted)
&& !isUIAvatar()
- && sUseImpostors // FIXME
+ && (sUseImpostors || visually_muted) // FIXME??
&& !mNeedsAnimUpdate
&& !sFreezeCounter)
{
@@ -10066,7 +10063,7 @@ BOOL LLVOAvatar::updateLOD()
return FALSE;
}
- if (isImpostor() && 0 != mDrawable->getNumFaces() && mDrawable->getFace(0)->hasGeometry())
+ if (!LLPipeline::sImpostorRenderAVVO && isImpostor() && 0 != mDrawable->getNumFaces() && mDrawable->getFace(0)->hasGeometry())
{
return TRUE;
}
@@ -10276,13 +10273,15 @@ BOOL LLVOAvatar::isImpostor()
{
// FIXME this doesn't seem to actually mean that the avatar is currently shown as an impostor, or should be.
// un-impostored avs have mUpdatePeriod 1. IMPOSTOR_PERIOD is 2.
- return sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD));
+ //return sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD));
+ return (isVisuallyMuted() || (sUseImpostors && (mUpdatePeriod >= IMPOSTOR_PERIOD))) ? TRUE : FALSE;
}
-BOOL LLVOAvatar::shouldImpostor(const U32 rank_factor) const
+BOOL LLVOAvatar::shouldImpostor(const U32 rank_factor)
{
// FIXME sUseImpostors question
- return (!isSelf() && sUseImpostors && mVisibilityRank > (sMaxNonImpostors * rank_factor));
+ //return (!isSelf() && sUseImpostors && mVisibilityRank > (sMaxNonImpostors * rank_factor));
+ return (!isSelf() && (sUseImpostors || isVisuallyMuted()) && mVisibilityRank > (sMaxNonImpostors * rank_factor));
}
BOOL LLVOAvatar::needsImpostorUpdate() const
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 8f9854fad3..7f816d6a2e 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -320,7 +320,7 @@ public:
static U32 sMaxNonImpostors; //(affected by control "RenderAvatarMaxNonImpostors")
static F32 sRenderDistance; //distance at which avatars will render.
static BOOL sShowAnimationDebug; // show animation debug info
- static bool sUseImpostors; //use impostors for far away avatars
+ static bool sUseImpostors; //use impostors for far away avatars, impostors are always on for 'mute' list
static BOOL sShowFootPlane; // show foot collision plane reported by server
static BOOL sShowCollisionVolumes; // show skeletal collision volumes
static BOOL sVisibleInFirstPerson;
@@ -554,7 +554,7 @@ private:
//--------------------------------------------------------------------
public:
virtual BOOL isImpostor();
- BOOL shouldImpostor(const U32 rank_factor = 1) const;
+ BOOL shouldImpostor(const U32 rank_factor = 1);
BOOL needsImpostorUpdate() const;
const LLVector3& getImpostorOffset() const;
const LLVector2& getImpostorDim() const;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index d850f3ced1..4cbe5a29be 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -340,6 +340,7 @@ bool LLPipeline::sRenderGlow = false;
bool LLPipeline::sReflectionRender = false;
bool LLPipeline::sDistortionRender = false;
bool LLPipeline::sImpostorRender = false;
+bool LLPipeline::sImpostorRenderAVVO = false;
bool LLPipeline::sImpostorRenderAlphaDepthPass = false;
bool LLPipeline::sUnderWaterRender = false;
bool LLPipeline::sTextureBindTest = false;
@@ -3076,7 +3077,7 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
{
LLVOAvatar* av = vobj->asAvatar();
if (av &&
- (av->isImpostor()
+ ((!sImpostorRenderAVVO && av->isImpostor()) //ignore impostor flag during impostor pass
|| av->isInMuteList()
|| (LLVOAvatar::AOA_JELLYDOLL == av->getOverallAppearance() && !av->needsImpostorUpdate()) ))
{
@@ -10920,8 +10921,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
{
LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_MARK_VISIBLE);
markVisible(avatar->mDrawable, *viewer_camera);
- // FIXME temporarily hacked during impostor generation??
- LLVOAvatar::sUseImpostors = false; // @TODO ???
+ sImpostorRenderAVVO = true;
LLVOAvatar::attachment_map_t::iterator iter;
for (iter = avatar->mAttachmentPoints.begin();
@@ -11161,8 +11161,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
avatar->setImpostorDim(tdim);
- // FIXME restored here. Where is this temp hack used??
- LLVOAvatar::sUseImpostors = (0 != LLVOAvatar::sMaxNonImpostors);
+ sImpostorRenderAVVO = false;
sUseOcclusion = occlusion;
sReflectionRender = false;
sImpostorRender = false;
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 600bdd9d06..397c5ef9ff 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -590,6 +590,7 @@ public:
static bool sReflectionRender;
static bool sDistortionRender;
static bool sImpostorRender;
+ static bool sImpostorRenderAVVO;
static bool sImpostorRenderAlphaDepthPass;
static bool sUnderWaterRender;
static bool sRenderGlow;