summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolavatar.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-09-18 17:53:35 +0100
committerGraham Linden <graham@lindenlab.com>2018-09-18 17:53:35 +0100
commit53abfe53bd91e7d81ffbf037b807e2e8b226d2f2 (patch)
treed744145afe55335ea05ceaceae463d6616f248b3 /indra/newview/lldrawpoolavatar.cpp
parent32a147369e0f4979136b8d2a3fc57154a01c6935 (diff)
SL-1835
Make attachmentAlphaMaskShadow frag shader ignore vert alpha which can be incorrect. Make discard test in attachmentAlphaMaskShadow match other shadow shaders more closely. Fix highlightF shader compile error.
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rw-r--r--indra/newview/lldrawpoolavatar.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index a9df63debd..a2308b2529 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1807,6 +1807,9 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
S32 offset = face->getIndicesStart();
U32 count = face->getIndicesCount();
+ U16 start = face->getGeomStart();
+ U16 end = start + face->getGeomCount()-1;
+
LLDrawable* drawable = face->getDrawable();
if (!drawable)
{
@@ -1862,15 +1865,10 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
LLViewerTexture* tex = face->getTexture(LLRender::DIFFUSE_MAP);
if (tex)
{
- LLGLenum image_format = tex->getPrimaryFormat();
if (tex->getIsAlphaMask())
{
is_alpha_mask = true;
}
- else if (!is_alpha_mask && (image_format == GL_RGBA || image_format == GL_ALPHA))
- {
- is_alpha_blend = true;
- }
}
if (mat)
@@ -1894,6 +1892,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
case LLMaterial::DIFFUSE_ALPHA_MODE_NONE:
default:
is_alpha_blend = false;
+ is_alpha_mask = false;
break;
}
}
@@ -1906,6 +1905,15 @@ 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 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))
{
@@ -1972,9 +1980,6 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
data_mask &= ~LLVertexBuffer::MAP_WEIGHT4;
}
- U16 start = face->getGeomStart();
- U16 end = start + face->getGeomCount()-1;
-
/*if (glow)
{
gGL.diffuseColor4f(0,0,0,face->getTextureEntry()->getGlow());