diff options
author | Andrey Lihatskiy <andreylproductengine@lindenlab.com> | 2018-09-24 17:22:12 +0000 |
---|---|---|
committer | Andrey Lihatskiy <andreylproductengine@lindenlab.com> | 2018-09-24 17:22:12 +0000 |
commit | 3f970601339fa34937454fd83820ffb1c7d6b295 (patch) | |
tree | 704d55f5bae28fe4463f148da92bc2aead6717f3 | |
parent | 7c84656b7648e343b545f163e283d4de7deb622f (diff) | |
parent | 00fe3e06e2d4a43b8dc9fd03ae247b392bca5446 (diff) |
Merged in graham_linden/viewer-cougar-graham (pull request #30)
SL-6613
Approved-by: Andrey Lihatskiy <andreylproductengine@lindenlab.com>
Approved-by: Ruslan Teliuk <ruslantproductengine@lindenlab.com>
-rw-r--r-- | indra/newview/lldrawpoolavatar.cpp | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index a2308b2529..a1003aa864 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1871,19 +1871,38 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) } } + if (tex) + { + LLGLenum image_format = tex->getPrimaryFormat(); + if (!is_alpha_mask && (image_format == GL_RGBA || image_format == GL_ALPHA)) + { + is_alpha_blend = true; + } + } + + if (tex_entry) + { + if (tex_entry->getAlpha() <= 0.99f) + { + is_alpha_blend = true; + } + } + if (mat) { switch (LLMaterial::eDiffuseAlphaMode(mat->getDiffuseAlphaMode())) { case LLMaterial::DIFFUSE_ALPHA_MODE_MASK: { - is_alpha_mask = true; + is_alpha_mask = true; + is_alpha_blend = false; } break; case LLMaterial::DIFFUSE_ALPHA_MODE_BLEND: { is_alpha_blend = true; + is_alpha_mask = false; } break; @@ -1897,23 +1916,6 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) } } - if (tex_entry) - { - if (tex_entry->getAlpha() <= 0.99f) - { - is_alpha_blend = true; - } - } - - if (tex) - { - LLGLenum image_format = tex->getPrimaryFormat(); - if (!is_alpha_mask && (image_format == GL_RGBA || image_format == GL_ALPHA)) - { - is_alpha_blend = true; - } - } - // if this is alpha mask content and we're doing opaques or a non-alpha-mask shadow pass... if (is_alpha_mask && (LLDrawPoolAvatar::sSkipTransparent || LLDrawPoolAvatar::sShadowPass != SHADOW_PASS_ATTACHMENT_ALPHA_MASK)) { |