diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 77c2fedfa9..32e7391e5c 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -2262,6 +2262,14 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) continue; } + // Niran's optimization + const LLTextureEntry* tex_entry = face->getTextureEntry(); + if (tex_entry && tex_entry->getAlpha() == 0.f) + { + continue; + } + // + //stop_glerror(); //const LLVolumeFace& vol_face = volume->getVolumeFace(te); @@ -2273,7 +2281,8 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) LLVertexBuffer* buff = face->getVertexBuffer(); - const LLTextureEntry* tex_entry = face->getTextureEntry(); + // Niran's optimization + //const LLTextureEntry* tex_entry = face->getTextureEntry(); LLMaterial* mat = tex_entry ? tex_entry->getMaterialParams().get() : nullptr; if (LLDrawPoolAvatar::sShadowPass >= 0)