summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-03-07 12:41:11 -0500
committerOz Linden <oz@lindenlab.com>2016-03-07 12:41:11 -0500
commit5822fb00b605d4f4ddd01e887b40d04b67e162a9 (patch)
tree0aa733a2357c99383f18ed34d2fb2ad4ad0caa24 /indra/newview/pipeline.cpp
parentc7ebeb842010c4a814978f63c464e1546bd6a9be (diff)
parent346ee6595d395a92a1445441467971510e6f4b6d (diff)
merge DRTVWR-398 build cleanup fixes
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp48
1 files changed, 35 insertions, 13 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 3c58ce0c09..a4d41164e5 100644
--- 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 =
@@ -3113,7 +3114,9 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
if (vobj) // this test may not be needed, see above
{
LLVOAvatar* av = vobj->asAvatar();
- if (av && av->isImpostor())
+ if (av && (av->isImpostor()
+ || av->isInMuteList()
+ || (LLVOAvatar::AV_DO_NOT_RENDER == av->getVisualMuteSettings() && !av->needsImpostorUpdate()) ))
{
return;
}
@@ -6111,6 +6114,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 +11314,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 +11377,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 +11490,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 +11552,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
LLGLDisable blend(GL_BLEND);
- if (visually_muted)
+ if (visually_muted || too_complex)
{
gGL.setColorMask(true, true);
}
@@ -11562,13 +11581,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 +11617,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
avatar->setImpostorDim(tdim);
- LLVOAvatar::sUseImpostors = TRUE;
+ LLVOAvatar::sUseImpostors = true; // @TODO ???
sUseOcclusion = occlusion;
sReflectionRender = FALSE;
sImpostorRender = FALSE;