summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rw-r--r--[-rwxr-xr-x]indra/newview/lldrawpoolavatar.cpp37
1 files changed, 25 insertions, 12 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 33c6d0b00a..843cd9b249 100755..100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -51,6 +51,7 @@
#include "llrendersphere.h"
#include "llviewerpartsim.h"
#include "llviewercontrol.h" // for gSavedSettings
+#include "llviewertexturelist.h"
static U32 sDataMask = LLDrawPoolAvatar::VERTEX_DATA_MASK;
static U32 sBufferUsage = GL_STREAM_DRAW_ARB;
@@ -62,6 +63,7 @@ BOOL LLDrawPoolAvatar::sSkipTransparent = FALSE;
S32 LLDrawPoolAvatar::sDiffuseChannel = 0;
F32 LLDrawPoolAvatar::sMinimumAlpha = 0.2f;
+LLUUID gBlackSquareID;
static bool is_deferred_render = false;
static bool is_post_deferred_render = false;
@@ -471,7 +473,9 @@ void LLDrawPoolAvatar::renderShadow(S32 pass)
}
BOOL impostor = avatarp->isImpostor();
- if (impostor)
+ if (impostor
+ && LLVOAvatar::AV_DO_NOT_RENDER != avatarp->getVisualMuteSettings()
+ && LLVOAvatar::AV_ALWAYS_RENDER != avatarp->getVisualMuteSettings())
{
return;
}
@@ -1245,7 +1249,9 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
BOOL impostor = avatarp->isImpostor() && !single_avatar;
- if (impostor && pass != 0)
+ if (( avatarp->isInMuteList()
+ || impostor
+ || (LLVOAvatar::AV_DO_NOT_RENDER == avatarp->getVisualMuteSettings() && !avatarp->needsImpostorUpdate()) ) && pass != 0)
{ //don't draw anything but the impostor for impostored avatars
return;
}
@@ -1262,7 +1268,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
LLVOAvatar::sNumVisibleAvatars++;
}
- if (impostor)
+ if (impostor || (LLVOAvatar::AV_DO_NOT_RENDER == avatarp->getVisualMuteSettings() && !avatarp->needsImpostorUpdate()))
{
if (LLPipeline::sRenderDeferred && !LLPipeline::sReflectionRender && avatarp->mImpostor.isComplete())
{
@@ -1275,18 +1281,11 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
avatarp->mImpostor.bindTexture(1, specular_channel);
}
}
- avatarp->renderImpostor(LLColor4U(255,255,255,255), sDiffuseChannel);
+ avatarp->renderImpostor(avatarp->getMutedAVColor(), sDiffuseChannel);
}
return;
}
- llassert(LLPipeline::sImpostorRender || !avatarp->isVisuallyMuted());
-
- /*if (single_avatar && avatarp->mSpecialRenderMode >= 1) // 1=anim preview, 2=image preview, 3=morph view
- {
- gPipeline.enableLightsAvatarEdit(LLColor4(.5f, .5f, .5f, 1.f));
- }*/
-
if (pass == 1)
{
// render rigid meshes (eyeballs) first
@@ -1775,7 +1774,21 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
{
//order is important here LLRender::DIFFUSE_MAP should be last, becouse it change
//(gGL).mCurrTextureUnitIndex
- gGL.getTexUnit(specular_channel)->bind(face->getTexture(LLRender::SPECULAR_MAP));
+ LLViewerTexture* specular = NULL;
+ if (LLPipeline::sImpostorRender)
+ {
+ specular = LLViewerTextureManager::findFetchedTexture(gBlackSquareID, TEX_LIST_STANDARD);
+ llassert(NULL != specular);
+ }
+ else
+ {
+ specular = face->getTexture(LLRender::SPECULAR_MAP);
+ }
+ if (specular)
+ {
+ gGL.getTexUnit(specular_channel)->bind(specular);
+ }
+
gGL.getTexUnit(normal_channel)->bind(face->getTexture(LLRender::NORMAL_MAP));
gGL.getTexUnit(sDiffuseChannel)->bind(face->getTexture(LLRender::DIFFUSE_MAP), false, true);