MAINT-6183: Remove geometry bytes as a trigger for muted/impostor rendering
parent
9d681027b3
commit
ca7631e4d7
|
|
@ -9972,13 +9972,13 @@
|
|||
<key>RenderAutoMuteByteLimit</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Maximum bytes of attachments before an avatar is rendered as a simple impostor (0 for no limit).</string>
|
||||
<string>OBSOLETE and UNUSED.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>10000000</integer>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RenderAvatarMaxNonImpostors</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -862,7 +862,7 @@ void LLSpatialGroup::handleDestruction(const TreeNode* node)
|
|||
{
|
||||
if (bridge->mAvatar.notNull())
|
||||
{
|
||||
bridge->mAvatar->subtractAttachmentSizes( mGeometryBytes, mSurfaceArea );
|
||||
bridge->mAvatar->subtractAttachmentArea(mSurfaceArea );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -680,11 +680,10 @@ public:
|
|||
avatar->calculateUpdateRenderComplexity(); // Make sure the numbers are up-to-date
|
||||
|
||||
trunc_name = utf8str_truncate(avatar->getFullname(), 16);
|
||||
addText(xpos, ypos, llformat("%s : %s, complexity %d, bytes %d area %.2f",
|
||||
addText(xpos, ypos, llformat("%s : %s, complexity %d, area %.2f",
|
||||
trunc_name.c_str(),
|
||||
LLVOAvatar::rezStatusToString(avatar->getRezzedStatus()).c_str(),
|
||||
avatar->getVisualComplexity(),
|
||||
avatar->getAttachmentGeometryBytes(),
|
||||
avatar->getAttachmentSurfaceArea()));
|
||||
ypos += y_inc;
|
||||
av_iter++;
|
||||
|
|
|
|||
|
|
@ -671,7 +671,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
|
|||
LLAvatarAppearance(&gAgentWearables),
|
||||
LLViewerObject(id, pcode, regionp),
|
||||
mSpecialRenderMode(0),
|
||||
mAttachmentGeometryBytes(0),
|
||||
mAttachmentSurfaceArea(0.f),
|
||||
mReportedVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN),
|
||||
mTurning(FALSE),
|
||||
|
|
@ -6523,10 +6522,8 @@ bool LLVOAvatar::isTooComplex() const
|
|||
{
|
||||
// Determine if visually muted or not
|
||||
static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAvatarMaxComplexity", 0U);
|
||||
static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit", 0U);
|
||||
static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 10.0E6f);
|
||||
too_complex = ((max_render_cost > 0 && mVisualComplexity > max_render_cost)
|
||||
|| (max_attachment_bytes > 0 && mAttachmentGeometryBytes > max_attachment_bytes)
|
||||
|| (max_attachment_area > 0.0f && mAttachmentSurfaceArea > max_attachment_area)
|
||||
);
|
||||
}
|
||||
|
|
@ -8304,37 +8301,17 @@ void LLVOAvatar::idleUpdateRenderComplexity()
|
|||
}
|
||||
mText->addLine(info_line, info_color, info_style);
|
||||
|
||||
// Attachment byte limit
|
||||
static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit", 0);
|
||||
info_line = llformat("%.1f KB", mAttachmentGeometryBytes/1024.f);
|
||||
if (max_attachment_bytes != 0) // zero means don't care, so don't bother coloring based on this
|
||||
{
|
||||
green_level = 1.f-llclamp(((F32) mAttachmentGeometryBytes-(F32)max_attachment_bytes)/(F32)max_attachment_bytes, 0.f, 1.f);
|
||||
red_level = llmin((F32) mAttachmentGeometryBytes/(F32)max_attachment_bytes, 1.f);
|
||||
info_color.set(red_level, green_level, 0.0, 1.0);
|
||||
info_style = ( mAttachmentGeometryBytes > max_attachment_bytes
|
||||
? LLFontGL::BOLD : LLFontGL::NORMAL );
|
||||
}
|
||||
else
|
||||
{
|
||||
info_color.set(LLColor4::grey);
|
||||
info_style = LLFontGL::NORMAL;
|
||||
}
|
||||
mText->addLine(info_line, info_color, info_style);
|
||||
|
||||
updateText(); // corrects position
|
||||
}
|
||||
}
|
||||
|
||||
void LLVOAvatar::addAttachmentSizes(U32 delta_bytes, F32 delta_area)
|
||||
void LLVOAvatar::addAttachmentArea(F32 delta_area)
|
||||
{
|
||||
mAttachmentGeometryBytes += delta_bytes;
|
||||
mAttachmentSurfaceArea += delta_area;
|
||||
}
|
||||
|
||||
void LLVOAvatar::subtractAttachmentSizes(U32 delta_bytes, F32 delta_area)
|
||||
void LLVOAvatar::subtractAttachmentArea(F32 delta_area)
|
||||
{
|
||||
mAttachmentGeometryBytes = delta_bytes > mAttachmentGeometryBytes ? 0 : mAttachmentGeometryBytes - delta_bytes;
|
||||
mAttachmentSurfaceArea = delta_area > mAttachmentSurfaceArea ? 0.0 : mAttachmentSurfaceArea - delta_area;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -259,10 +259,9 @@ public:
|
|||
void updateVisualComplexity();
|
||||
|
||||
U32 getVisualComplexity() { return mVisualComplexity; }; // Numbers calculated here by rendering AV
|
||||
S32 getAttachmentGeometryBytes() { return mAttachmentGeometryBytes; }; // number of bytes in attached geometry
|
||||
F32 getAttachmentSurfaceArea() { return mAttachmentSurfaceArea; }; // estimated surface area of attachments
|
||||
void addAttachmentSizes(U32 delta_bytes, F32 delta_area);
|
||||
void subtractAttachmentSizes(U32 delta_bytes, F32 delta_area);
|
||||
void addAttachmentArea(F32 delta_area);
|
||||
void subtractAttachmentArea(F32 delta_area);
|
||||
|
||||
U32 getReportedVisualComplexity() { return mReportedVisualComplexity; }; // Numbers as reported by the SL server
|
||||
void setReportedVisualComplexity(U32 value) { mReportedVisualComplexity = value; };
|
||||
|
|
@ -412,7 +411,6 @@ public:
|
|||
S32 mSpecialRenderMode; // special lighting
|
||||
|
||||
private:
|
||||
S32 mAttachmentGeometryBytes; //number of bytes in attached geometry
|
||||
F32 mAttachmentSurfaceArea; //estimated surface area of attachments
|
||||
bool shouldAlphaMask();
|
||||
|
||||
|
|
|
|||
|
|
@ -4727,7 +4727,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
|
|||
|
||||
if (pAvatarVO)
|
||||
{
|
||||
pAvatarVO->subtractAttachmentSizes( group->mGeometryBytes, group->mSurfaceArea );
|
||||
pAvatarVO->subtractAttachmentArea( group->mSurfaceArea );
|
||||
}
|
||||
|
||||
group->mGeometryBytes = 0;
|
||||
|
|
@ -5281,7 +5281,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
|
|||
|
||||
if (pAvatarVO)
|
||||
{
|
||||
pAvatarVO->addAttachmentSizes( group->mGeometryBytes, group->mSurfaceArea );
|
||||
pAvatarVO->addAttachmentArea( group->mSurfaceArea );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue