diff options
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--[-rwxr-xr-x] | indra/newview/pipeline.cpp | 45 |
1 files changed, 31 insertions, 14 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 6c418966fd..c6bbfb1c8f 100755..100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -568,7 +568,7 @@ void LLPipeline::init() connectRefreshCachedSettingsSafe("RenderAutoMaskAlphaDeferred"); connectRefreshCachedSettingsSafe("RenderAutoMaskAlphaNonDeferred"); connectRefreshCachedSettingsSafe("RenderUseFarClip"); - connectRefreshCachedSettingsSafe("RenderAvatarMaxVisible"); + connectRefreshCachedSettingsSafe("RenderAvatarMaxNonImpostors"); connectRefreshCachedSettingsSafe("RenderDelayVBUpdate"); connectRefreshCachedSettingsSafe("UseOcclusion"); connectRefreshCachedSettingsSafe("VertexShaderEnable"); @@ -1080,7 +1080,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 = @@ -3112,7 +3113,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,7 +6114,9 @@ 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()->isInMuteList()) + if(vobj && vobj->getAvatar() + && (vobj->getAvatar()->isTooComplex() || vobj->getAvatar()->isInMuteList()) + ) { drawable->clearState(LLDrawable::NEARBY_LIGHT); continue; @@ -11315,16 +11320,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); } @@ -11369,7 +11383,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(); @@ -11482,7 +11496,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; } @@ -11544,7 +11558,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) LLGLDisable blend(GL_BLEND); - if (visually_muted) + if (visually_muted || too_complex) { gGL.setColorMask(true, true); } @@ -11573,13 +11587,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 ); } { @@ -11606,7 +11623,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) avatar->setImpostorDim(tdim); - LLVOAvatar::sUseImpostors = TRUE; + LLVOAvatar::sUseImpostors = true; // @TODO ??? sUseOcclusion = occlusion; sReflectionRender = FALSE; sImpostorRender = FALSE; |