summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolavatar.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-08-31 14:35:41 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-08-31 14:35:41 -0400
commit822d521e46d70359985e4d6e8ccb34766492a980 (patch)
tree4f9aefc823d6e6840cf6ec55561a502261c4ca93 /indra/newview/lldrawpoolavatar.cpp
parente58d50e509d060320174c80af647da6ff9a3839f (diff)
parent5e5869c63a05e3d773fc4d19deaff171efa5014c (diff)
merge
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rw-r--r--indra/newview/lldrawpoolavatar.cpp28
1 files changed, 22 insertions, 6 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 984014f309..37ee81aeb5 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);
@@ -590,12 +589,22 @@ void LLDrawPoolAvatar::beginImpostor()
LLVOAvatar::sNumVisibleAvatars = 0;
}
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gImpostorProgram.bind();
+ gImpostorProgram.setAlphaRange(0.01f, 1.f);
+ }
+
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
sDiffuseChannel = 0;
}
void LLDrawPoolAvatar::endImpostor()
{
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gImpostorProgram.unbind();
+ }
gPipeline.enableLightsDynamic();
}
@@ -605,16 +614,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
@@ -647,6 +657,7 @@ void LLDrawPoolAvatar::beginDeferredImpostor()
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
sVertexProgram->bind();
+ sVertexProgram->setAlphaRange(0.01f, 1.f);
}
void LLDrawPoolAvatar::endDeferredImpostor()
@@ -692,11 +703,11 @@ void LLDrawPoolAvatar::beginSkinned()
{
if (LLPipeline::sUnderWaterRender)
{
- sVertexProgram = &gObjectSimpleNonIndexedWaterProgram;
+ sVertexProgram = &gObjectAlphaMaskNonIndexedWaterProgram;
}
else
{
- sVertexProgram = &gObjectSimpleNonIndexedProgram;
+ sVertexProgram = &gObjectAlphaMaskNonIndexedProgram;
}
}
@@ -728,6 +739,11 @@ void LLDrawPoolAvatar::beginSkinned()
sVertexProgram->bind();
}
}
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ sVertexProgram->setAlphaRange(0.2f, 1.f);
+ }
}
void LLDrawPoolAvatar::endSkinned()