summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolavatar.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-07-29 17:46:16 -0500
committerDave Parks <davep@lindenlab.com>2011-07-29 17:46:16 -0500
commit8ec39da3468f53af85d0cd4d4d9c54a72d6b8152 (patch)
tree6e8b4c25cbc7411bf6d6e76af852a600debf8838 /indra/newview/lldrawpoolavatar.cpp
parente16eb4ae4a73125bc4e74fc667aa99110ac77c29 (diff)
SH-2181 Fix for alpha flickering when basic shaders enabled (don't use glAlphaFunc when shaders are available).
Reviewed by Leslie
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rw-r--r--indra/newview/lldrawpoolavatar.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 9f790d03fe..694b7dcedd 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -258,7 +258,6 @@ void LLDrawPoolAvatar::beginPostDeferredAlpha()
sSkipOpaque = TRUE;
sShaderLevel = mVertexShaderLevel;
sVertexProgram = &gDeferredAvatarAlphaProgram;
-
sRenderingSkinned = TRUE;
gPipeline.bindDeferredShader(*sVertexProgram);
@@ -361,7 +360,7 @@ void LLDrawPoolAvatar::beginShadowPass(S32 pass)
{
gAvatarMatrixParam = sVertexProgram->mUniform[LLViewerShaderMgr::AVATAR_MATRIX];
}
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER_EQUAL, 0.2f);
+ //gGL.setAlphaRejectSettings(LLRender::CF_GREATER_EQUAL, 0.2f);
glColor4f(1,1,1,1);
@@ -605,16 +604,17 @@ void LLDrawPoolAvatar::beginRigid()
{
if (LLPipeline::sUnderWaterRender)
{
- sVertexProgram = &gObjectSimpleNonIndexedWaterProgram;
+ sVertexProgram = &gObjectAlphaMaskNonIndexedWaterProgram;
}
else
{
- sVertexProgram = &gObjectSimpleNonIndexedProgram;
+ sVertexProgram = &gObjectAlphaMaskNonIndexedProgram;
}
if (sVertexProgram != NULL)
{ //eyeballs render with the specular shader
sVertexProgram->bind();
+ sVertexProgram->setAlphaRange(0.2f, 1.f);
}
}
else
@@ -692,11 +692,11 @@ void LLDrawPoolAvatar::beginSkinned()
{
if (LLPipeline::sUnderWaterRender)
{
- sVertexProgram = &gObjectSimpleNonIndexedWaterProgram;
+ sVertexProgram = &gObjectAlphaMaskNonIndexedWaterProgram;
}
else
{
- sVertexProgram = &gObjectSimpleNonIndexedProgram;
+ sVertexProgram = &gObjectAlphaMaskNonIndexedProgram;
}
}
@@ -728,6 +728,11 @@ void LLDrawPoolAvatar::beginSkinned()
sVertexProgram->bind();
}
}
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ sVertexProgram->setAlphaRange(0.2f, 1.f);
+ }
}
void LLDrawPoolAvatar::endSkinned()