summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/lldrawpoolavatar.cpp38
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))
{