summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
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.cpp14
-rw-r--r--indra/newview/llvoavatar.h4
-rw-r--r--indra/newview/pipeline.cpp7
-rw-r--r--indra/newview/pipeline.h1
6 files changed, 19 insertions, 16 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 f45c3c86a1..9ac52120d3 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2763,7 +2763,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
BOOL visible = isVisible() || mNeedsAnimUpdate;
// update attachments positions
- if (detailed_update || !sUseImpostors)
+ if (detailed_update)
{
LL_RECORD_BLOCK_TIME(FTM_ATTACHMENT_UPDATE);
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
@@ -3608,7 +3608,7 @@ bool LLVOAvatar::isVisuallyMuted()
{
muted = true;
}
- else
+ else if (sUseImpostors)
{
muted = isTooComplex();
}
@@ -3995,7 +3995,7 @@ void LLVOAvatar::computeUpdatePeriod()
&& isVisible()
&& (!isSelf() || visually_muted)
&& !isUIAvatar()
- && sUseImpostors
+ && (sUseImpostors || visually_muted)
&& !mNeedsAnimUpdate
&& !sFreezeCounter)
{
@@ -10050,7 +10050,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;
}
@@ -10257,12 +10257,12 @@ void LLVOAvatar::updateImpostors()
// virtual
BOOL LLVOAvatar::isImpostor()
{
- return sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD)) ? TRUE : FALSE;
+ return (isVisuallyMuted() || (sUseImpostors && (mUpdatePeriod >= IMPOSTOR_PERIOD))) ? TRUE : FALSE;
}
-BOOL LLVOAvatar::shouldImpostor(const U32 rank_factor) const
+BOOL LLVOAvatar::shouldImpostor(const U32 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 8d23d955e3..af65e5750f 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 82ae99309d..3fa40c4ecf 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,7 +10921,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
{
LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_MARK_VISIBLE);
markVisible(avatar->mDrawable, *viewer_camera);
- LLVOAvatar::sUseImpostors = false; // @TODO ???
+ sImpostorRenderAVVO = true;
LLVOAvatar::attachment_map_t::iterator iter;
for (iter = avatar->mAttachmentPoints.begin();
@@ -11160,7 +11161,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
avatar->setImpostorDim(tdim);
- 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;