summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolavatar.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-09-24 16:57:31 +0100
committerGraham Linden <graham@lindenlab.com>2018-09-24 16:57:31 +0100
commit00fe3e06e2d4a43b8dc9fd03ae247b392bca5446 (patch)
tree9e54e053731123d372ce41c0dfa0eb5bcc5a4b6a /indra/newview/lldrawpoolavatar.cpp
parentc7574e3d2d953dc6aa86a5c1c82ea43c3969b4e9 (diff)
SL-6613 more fine-tuning of the logic around rigged alpha shadows to avoid issues when a diffuse texture with alpha is used with non-blended material diffuse alpha modes
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-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))
{