From 09f43945d598b50a31bdbe4a3f86c73d909ec9bc Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 4 Mar 2016 16:42:41 -0500 Subject: MAINT-5721: set new (much lower) limits for RenderAutoMuteSurfaceAreaLimit, but also disable if RenderAvatarMaxComplexity is unlimited (zero) --- indra/newview/llvoavatar.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index c88f5d1fce..e5d440fa3e 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6522,10 +6522,14 @@ bool LLVOAvatar::isTooComplex() const { // Determine if visually muted or not static LLCachedControl max_render_cost(gSavedSettings, "RenderAvatarMaxComplexity", 0U); - static LLCachedControl max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 10.0E6f); - too_complex = ((max_render_cost > 0 && mVisualComplexity > max_render_cost) - || (max_attachment_area > 0.0f && mAttachmentSurfaceArea > max_attachment_area) - ); + static LLCachedControl max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 1000.0f); + // If the user has chosen unlimited max complexity, we also disregard max attachment area + // so that unlimited will completely disable the overly complex impostor rendering + // yes, this leaves them vulnerable to griefing objects... their choice + too_complex = ( max_render_cost > 0 + && ( mVisualComplexity > max_render_cost + || (max_attachment_area > 0.0f && mAttachmentSurfaceArea > max_attachment_area) + )); } return too_complex; @@ -8282,10 +8286,10 @@ void LLVOAvatar::idleUpdateRenderComplexity() mText->addLine(info_line, info_color, info_style); // Attachment Surface Area - static LLCachedControl max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 10.0E6f); + static LLCachedControl max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 1000.0f); info_line = llformat("%.2f m^2", mAttachmentSurfaceArea); - if (max_attachment_area != 0) // zero means don't care, so don't bother coloring based on this + if (max_render_cost != 0 && max_attachment_area != 0) // zero means don't care, so don't bother coloring based on this { green_level = 1.f-llclamp((mAttachmentSurfaceArea-max_attachment_area)/max_attachment_area, 0.f, 1.f); red_level = llmin(mAttachmentSurfaceArea/max_attachment_area, 1.f); -- cgit v1.2.3