SL-3278 Parts unique to 'self' should not affect render complexity

meow-7.2.2
Andrey Kleshchev 2020-09-08 21:30:54 +03:00
parent 6f16e6c4e0
commit 76ee89fb50
1 changed files with 17 additions and 4 deletions

View File

@ -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;