summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rwxr-xr-xindra/newview/pipeline.cpp44
1 files changed, 32 insertions, 12 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 3c58ce0c09..4d1725e927 100755
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -569,7 +569,7 @@ void LLPipeline::init()
connectRefreshCachedSettingsSafe("RenderAutoMaskAlphaDeferred");
connectRefreshCachedSettingsSafe("RenderAutoMaskAlphaNonDeferred");
connectRefreshCachedSettingsSafe("RenderUseFarClip");
- connectRefreshCachedSettingsSafe("RenderAvatarMaxVisible");
+ connectRefreshCachedSettingsSafe("RenderAvatarMaxNonImpostors");
connectRefreshCachedSettingsSafe("RenderDelayVBUpdate");
connectRefreshCachedSettingsSafe("UseOcclusion");
connectRefreshCachedSettingsSafe("VertexShaderEnable");
@@ -1081,7 +1081,8 @@ void LLPipeline::refreshCachedSettings()
LLPipeline::sAutoMaskAlphaDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaDeferred");
LLPipeline::sAutoMaskAlphaNonDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaNonDeferred");
LLPipeline::sUseFarClip = gSavedSettings.getBOOL("RenderUseFarClip");
- LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible");
+ LLVOAvatar::sMaxNonImpostors = gSavedSettings.getU32("RenderAvatarMaxNonImpostors");
+ LLVOAvatar::updateImpostorRendering(LLVOAvatar::sMaxNonImpostors);
LLPipeline::sDelayVBUpdate = gSavedSettings.getBOOL("RenderDelayVBUpdate");
LLPipeline::sUseOcclusion =
@@ -6111,6 +6112,13 @@ void LLPipeline::calcNearbyLights(LLCamera& camera)
{
const Light* light = &(*iter);
LLDrawable* drawable = light->drawable;
+ const LLViewerObject *vobj = light->drawable->getVObj();
+ if(vobj && vobj->getAvatar() && vobj->getAvatar()->isTooComplex())
+ {
+ drawable->clearState(LLDrawable::NEARBY_LIGHT);
+ continue;
+ }
+
LLVOVolume* volight = drawable->getVOVolume();
if (!volight || !drawable->isState(LLDrawable::LIGHT))
{
@@ -11304,16 +11312,25 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
if (!avatar || !avatar->mDrawable)
{
+ LL_WARNS_ONCE("AvatarRenderPipeline") << "Avatar is " << (avatar ? "not drawable" : "null") << LL_ENDL;
return;
}
+ LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " is drawable" << LL_ENDL;
assertInitialized();
bool visually_muted = avatar->isVisuallyMuted();
+ LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID()
+ << " is " << ( visually_muted ? "" : "not ") << "visually muted"
+ << LL_ENDL;
+ bool too_complex = avatar->isTooComplex();
+ LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID()
+ << " is " << ( too_complex ? "" : "not ") << "too complex"
+ << LL_ENDL;
pushRenderTypeMask();
- if (visually_muted)
+ if (visually_muted || too_complex)
{
andRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES);
}
@@ -11358,7 +11375,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
{
LL_RECORD_BLOCK_TIME(FTM_IMPOSTOR_MARK_VISIBLE);
markVisible(avatar->mDrawable, *viewer_camera);
- LLVOAvatar::sUseImpostors = FALSE;
+ LLVOAvatar::sUseImpostors = false; // @TODO ???
LLVOAvatar::attachment_map_t::iterator iter;
for (iter = avatar->mAttachmentPoints.begin();
@@ -11471,7 +11488,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
F32 old_alpha = LLDrawPoolAvatar::sMinimumAlpha;
- if (visually_muted)
+ if (visually_muted || too_complex)
{ //disable alpha masking for muted avatars (get whole skin silhouette)
LLDrawPoolAvatar::sMinimumAlpha = 0.f;
}
@@ -11533,7 +11550,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
LLGLDisable blend(GL_BLEND);
- if (visually_muted)
+ if (visually_muted || too_complex)
{
gGL.setColorMask(true, true);
}
@@ -11562,13 +11579,16 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
}
- if (LLMuteList::getInstance()->isMuted(avatar->getID()))
- { //grey muted avatar
- gGL.diffuseColor4ub(64,64,64,255);
+ if (visually_muted)
+ { // Visually muted avatar
+ LLColor4 muted_color(avatar->getMutedAVColor());
+ LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " MUTED set solid color " << muted_color << LL_ENDL;
+ gGL.diffuseColor4fv( muted_color.mV );
}
else
- { // Visually muted avatar
- gGL.diffuseColor4fv( avatar->getMutedAVColor().mV );
+ { //grey muted avatar
+ LL_DEBUGS_ONCE("AvatarRenderPipeline") << "Avatar " << avatar->getID() << " MUTED set grey" << LL_ENDL;
+ gGL.diffuseColor4fv(LLColor4::pink.mV );
}
{
@@ -11595,7 +11615,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
avatar->setImpostorDim(tdim);
- LLVOAvatar::sUseImpostors = TRUE;
+ LLVOAvatar::sUseImpostors = true; // @TODO ???
sUseOcclusion = occlusion;
sReflectionRender = FALSE;
sImpostorRender = FALSE;