summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-09-08 21:30:54 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-09-08 21:43:05 +0300
commit76ee89fb50e394bdaa1cfc85d57d76666beca7fb (patch)
treefa6b392c2f3ce007f45816404bec6757df4623da
parent6f16e6c4e0836353cb1a8d2c356abe4de78d315a (diff)
SL-3278 Parts unique to 'self' should not affect render complexity
-rw-r--r--indra/newview/llvoavatar.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index c5ae80dca3..8cc0cc174c 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -10388,10 +10388,23 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
ETextureIndex tex_index = baked_dict->mTextureIndex;
if ((tex_index != TEX_SKIRT_BAKED) || (isWearingWearableType(LLWearableType::WT_SKIRT)))
{
- if (isTextureVisible(tex_index))
- {
- cost +=COMPLEXITY_BODY_PART_COST;
- }
+ // Same as isTextureVisible(), but doesn't account for isSelf to ensure identical numbers for all avatars
+ if (isIndexLocalTexture(tex_index))
+ {
+ if (isTextureDefined(tex_index, 0))
+ {
+ cost += COMPLEXITY_BODY_PART_COST;
+ }
+ }
+ else
+ {
+ // baked textures can use TE images directly
+ if (isTextureDefined(tex_index)
+ && (getTEImage(tex_index)->getID() != IMG_INVISIBLE || LLDrawPoolAlpha::sShowDebugAlpha))
+ {
+ cost += COMPLEXITY_BODY_PART_COST;
+ }
+ }
}
}
LL_DEBUGS("ARCdetail") << "Avatar body parts complexity: " << cost << LL_ENDL;