summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/app_settings/high_graphics.xml5
-rwxr-xr-xindra/newview/app_settings/low_graphics.xml5
-rwxr-xr-xindra/newview/app_settings/mid_graphics.xml5
-rwxr-xr-xindra/newview/app_settings/settings.xml8
-rwxr-xr-xindra/newview/app_settings/ultra_graphics.xml5
-rwxr-xr-xindra/newview/llvoavatar.cpp109
6 files changed, 57 insertions, 80 deletions
diff --git a/indra/newview/app_settings/high_graphics.xml b/indra/newview/app_settings/high_graphics.xml
index 5bc2e1b7e6..37def19aaa 100755
--- a/indra/newview/app_settings/high_graphics.xml
+++ b/indra/newview/app_settings/high_graphics.xml
@@ -26,8 +26,11 @@
<RenderTerrainLODFactor value="2"/>
<!--Default for now-->
<RenderTreeLODFactor value="0.5"/>
- <!--Try Impostors-->
+ <!--Avater Impostors and Visual Muting Limits-->
<RenderUseImpostors value="TRUE"/>
+ <RenderAvatarMaxVisible value="20"/>
+ <RenderAutoMuteRenderWeightLimit value="350000"/>
+ <RenderAutoMuteSurfaceAreaLimit value="300"/>
<!--Default for now-->
<RenderVolumeLODFactor value="1.125"/>
<!--NO SHADERS-->
diff --git a/indra/newview/app_settings/low_graphics.xml b/indra/newview/app_settings/low_graphics.xml
index ca1dae0b86..683c2bd996 100755
--- a/indra/newview/app_settings/low_graphics.xml
+++ b/indra/newview/app_settings/low_graphics.xml
@@ -28,8 +28,11 @@
<RenderTerrainLODFactor value="1.0"/>
<!--Default for now-->
<RenderTreeLODFactor value="0.5"/>
- <!--Try Impostors-->
+ <!--Avater Impostors and Visual Muting Limits-->
<RenderUseImpostors value="TRUE"/>
+ <RenderAvatarMaxVisible value="12"/>
+ <RenderAutoMuteRenderWeightLimit value="75000"/>
+ <RenderAutoMuteSurfaceAreaLimit value="150"/>
<!--Default for now-->
<RenderVolumeLODFactor value="1.125"/>
<!--NO SHADERS-->
diff --git a/indra/newview/app_settings/mid_graphics.xml b/indra/newview/app_settings/mid_graphics.xml
index 01822fe64c..f9b199c728 100755
--- a/indra/newview/app_settings/mid_graphics.xml
+++ b/indra/newview/app_settings/mid_graphics.xml
@@ -26,8 +26,11 @@
<RenderTerrainLODFactor value="1.0"/>
<!--Default for now-->
<RenderTreeLODFactor value="0.5"/>
- <!--Try Impostors-->
+ <!--Avater Impostors and Visual Muting Limits-->
<RenderUseImpostors value="TRUE"/>
+ <RenderAvatarMaxVisible value="18"/>
+ <RenderAutoMuteRenderWeightLimit value="100000"/>
+ <RenderAutoMuteSurfaceAreaLimit value="200"/>
<!--Default for now-->
<RenderVolumeLODFactor value="1.125"/>
<!--NO SHADERS-->
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 276a65edc5..b78cb01d85 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -8298,7 +8298,9 @@
<key>RenderAvatarMaxVisible</key>
<map>
<key>Comment</key>
- <string>Maximum number of avatars to display at any one time</string>
+ <string>Maximum number of avatars to fully render at one time;
+ over this limit uses impostor rendering (simplified rendering
+ with less frequent updates)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -9887,7 +9889,7 @@
<key>Type</key>
<string>U32</string>
<key>Value</key>
- <integer>0</integer>
+ <integer>10000000</integer>
</map>
<key>RenderAutoMuteRenderWeightLimit</key>
<map>
@@ -9931,7 +9933,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <integer>0</integer>
+ <real>1.0E6</real>
</map>
<key>RenderVBOEnable</key>
diff --git a/indra/newview/app_settings/ultra_graphics.xml b/indra/newview/app_settings/ultra_graphics.xml
index 71459e5470..dcf63eced5 100755
--- a/indra/newview/app_settings/ultra_graphics.xml
+++ b/indra/newview/app_settings/ultra_graphics.xml
@@ -26,8 +26,11 @@
<RenderTerrainLODFactor value="2.0"/>
<!--Default for now-->
<RenderTreeLODFactor value="1.0"/>
- <!--Try Impostors-->
+ <!--Avater Impostors and Visual Muting Limits-->
<RenderUseImpostors value="TRUE"/>
+ <RenderAvatarMaxVisible value="0"/>
+ <RenderAutoMuteRenderWeightLimit value="0"/>
+ <RenderAutoMuteSurfaceAreaLimit value="10000"/>
<!--Default for now-->
<RenderVolumeLODFactor value="2.0"/>
<!--NO SHADERS-->
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 7e9f098172..b8bbde6a89 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -980,10 +980,11 @@ void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts)
iter != LLCharacter::sInstances.end(); ++iter)
{
LLVOAvatar* inst = (LLVOAvatar*) *iter;
- if (!inst)
- continue;
- S32 rez_status = inst->getRezzedStatus();
- counts[rez_status]++;
+ if (inst)
+ {
+ S32 rez_status = inst->getRezzedStatus();
+ counts[rez_status]++;
+ }
}
}
@@ -1973,9 +1974,6 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys,
}
}
- //LL_INFOS() << getRotation() << LL_ENDL;
- //LL_INFOS() << getPosition() << LL_ENDL;
-
return retval;
}
@@ -1991,7 +1989,7 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU
result = gTextureList.findImage(uuid);
}
if (!result)
-{
+ {
const std::string url = getImageURL(te,uuid);
if (url.empty())
@@ -3087,17 +3085,16 @@ bool LLVOAvatar::isVisuallyMuted()
{
bool muted = false;
+ // Priority order (highest priority first)
+ // * own avatar is never visually muted
+ // * if on the "always draw normally" list, draw them normally
+ // * if on the "always visually mute" list, mute them
+ // * draw them normally if they meet the following criteria:
+ // - within the closest N avatars
+ // - AND aren't over the thresholds
+ // * otherwise visually mute all other avatars
if (!isSelf())
{
- // Priority order (highest priority first)
- // * own avatar is never visually muted
- // * if on the "always draw normally" list, draw them normally
- // * if on the "always visually mute" list, mute them
- // * draw them normally if they meet the following criteria:
- // - within the closest N avatars OR on friends list OR in an IM chat
- // - AND aren't over the thresholds
- // * otherwise visually mute all other avatars
-
static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit", 0);
static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 0.0);
static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAutoMuteRenderWeightLimit", 0);
@@ -3121,30 +3118,11 @@ bool LLVOAvatar::isVisuallyMuted()
else
{ // Determine if visually muted or not
- muted = LLMuteList::getInstance()->isMuted(getID()) ||
- (mAttachmentGeometryBytes > max_attachment_bytes && max_attachment_bytes > 0) ||
- (mAttachmentSurfaceArea > max_attachment_area && max_attachment_area > 0.f) ||
- (mVisualComplexity > max_render_cost && max_render_cost > 0);
-
- // Could be part of the grand || collection above, but yanked out to make the logic visible
- if (!muted)
- {
- if (sMaxVisible > 0)
- { // They are above the visibilty rank - mute them
- muted = (mVisibilityRank > sMaxVisible);
- }
-
- // Always draw friends or those in IMs. Needs UI?
- if (muted || sMaxVisible == 0) // Don't mute friends or IMs
- {
- muted = !(LLAvatarTracker::instance().isBuddy(getID()));
- if (muted)
- { // Not a friend, so they are muted ... are they in an IM?
- LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL,getID());
- muted = !gIMMgr->hasSession(session_id);
- }
- }
- }
+ muted = ( (max_render_cost > 0 && mVisualComplexity > max_render_cost)
+ || (max_attachment_bytes > 0 && mAttachmentGeometryBytes > max_attachment_bytes)
+ || (max_attachment_area > 0.f && mAttachmentSurfaceArea > max_attachment_area)
+ || LLMuteList::getInstance()->isMuted(getID())
+ );
// Save visual mute state and set interval for updating
const F64 SECONDS_BETWEEN_RENDER_AUTO_MUTE_UPDATES = 1.5;
@@ -3328,7 +3306,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
removeAnimationData("Walk Speed");
}
mMotionController.setTimeStep(time_step);
-// LL_INFOS() << "Setting timestep to " << time_quantum * pixel_area_scale << LL_ENDL;
+ // LL_INFOS() << "Setting timestep to " << time_quantum * pixel_area_scale << LL_ENDL;
}
if (getParent() && !mIsSitting)
@@ -3469,7 +3447,6 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
fwdDir.normalize();
}
}
-
}
LLQuaternion root_rotation = mRoot->getWorldMatrix().quaternion();
@@ -3585,10 +3562,14 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
// update animations
if (mSpecialRenderMode == 1) // Animation Preview
+ {
updateMotions(LLCharacter::FORCE_UPDATE);
+ }
else
+ {
updateMotions(LLCharacter::NORMAL_UPDATE);
-
+ }
+
// update head position
updateHeadOffset();
@@ -3685,10 +3666,6 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
//mesh vertices need to be reskinned
mNeedsSkin = TRUE;
-
-
-
-
return TRUE;
}
//-----------------------------------------------------------------------------
@@ -7992,26 +7969,11 @@ void LLVOAvatar::idleUpdateRenderCost()
}
mText->addLine(info_line, info_color, info_style);
- // TEMPORARY Reported Cost
- info_line = llformat("%d reported ARC", mReportedVisualComplexity);
- mText->addLine(info_line, info_color /* same as real ARC */, LLFontGL::ITALIC);
-
// Visual rank
info_line = llformat("%d rank", mVisibilityRank);
-
- if (sMaxVisible != 0) // zero means no limit, so don't bother coloring based on this
- {
- green_level = 1.f-llclamp(((F32)sMaxVisible-(F32)mVisibilityRank)/(F32)sMaxVisible, 0.f, 1.f);
- red_level = llmin((F32) mVisibilityRank/(F32)sMaxVisible, 1.f);
- info_color.set(red_level, green_level, 0.0, 1.0);
- info_style = ( mVisibilityRank > sMaxVisible
- ? LLFontGL::BOLD : LLFontGL::NORMAL );
- }
- else
- {
- info_color.set(LLColor4::grey);
- info_style = LLFontGL::NORMAL;
- }
+ // Use grey for imposters, white for normal rendering or no impostors
+ info_color.set((sMaxVisible > 0 && mVisibilityRank > sMaxVisible) ? LLColor4::grey : LLColor4::white);
+ info_style = LLFontGL::NORMAL;
mText->addLine(info_line, info_color, info_style);
// Attachment Surface Area
@@ -8143,9 +8105,8 @@ void LLVOAvatar::calculateUpdateRenderCost()
for (LLVOVolume::texture_cost_t::iterator it = textures.begin(); it != textures.end(); ++it)
{
LLUUID image_id = it->first;
- if( image_id.isNull() || image_id == IMG_DEFAULT || image_id == IMG_DEFAULT_AVATAR)
- continue;
- if (all_textures.find(image_id) == all_textures.end())
+ if( ! (image_id.isNull() || image_id == IMG_DEFAULT || image_id == IMG_DEFAULT_AVATAR)
+ && (all_textures.find(image_id) == all_textures.end()))
{
// attachment texture not previously seen.
LL_INFOS() << "attachment_texture: " << image_id.asString() << LL_ENDL;
@@ -8211,15 +8172,17 @@ LLColor4 LLVOAvatar::calcMutedAVColor(F32 value, S32 range_low, S32 range_high)
// static
BOOL LLVOAvatar::isIndexLocalTexture(ETextureIndex index)
{
- if (index < 0 || index >= TEX_NUM_INDICES) return false;
- return LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mIsLocalTexture;
+ return (index < 0 || index >= TEX_NUM_INDICES)
+ ? false
+ : LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mIsLocalTexture;
}
// static
BOOL LLVOAvatar::isIndexBakedTexture(ETextureIndex index)
{
- if (index < 0 || index >= TEX_NUM_INDICES) return false;
- return LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mIsBakedTexture;
+ return (index < 0 || index >= TEX_NUM_INDICES)
+ ? false
+ : LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mIsBakedTexture;
}
const std::string LLVOAvatar::getBakedStatusForPrintout() const