Small optimization for avatar rendering by NiranV Dean

master
Ansariel 2020-10-26 08:54:19 +01:00
parent 5e4f8c1185
commit 0bcf5a46a4
1 changed files with 10 additions and 1 deletions

View File

@ -2262,6 +2262,14 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
continue;
}
// <FS:Ansariel> Niran's optimization
const LLTextureEntry* tex_entry = face->getTextureEntry();
if (tex_entry && tex_entry->getAlpha() == 0.f)
{
continue;
}
// </FS:Ansariel>
//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();
// <FS:Ansariel> Niran's optimization
//const LLTextureEntry* tex_entry = face->getTextureEntry();
LLMaterial* mat = tex_entry ? tex_entry->getMaterialParams().get() : nullptr;
if (LLDrawPoolAvatar::sShadowPass >= 0)