summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolavatar.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2013-08-06 14:16:46 -0700
committerGraham Linden <graham@lindenlab.com>2013-08-06 14:16:46 -0700
commit5b400d50e1f25667e2c865d85fd93546ffe7f96f (patch)
treef495ec82be8072b47885e0b90d42bcd3a226bd7c /indra/newview/lldrawpoolavatar.cpp
parent629bda7cf371f2eb2e7fc9adbfd123d5a079093e (diff)
NORSPEC-322 NORSPEC-342 fix issues with black impostors and missing alpha attachments on impostors
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rwxr-xr-xindra/newview/lldrawpoolavatar.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index e2a23ef56f..9434b51685 100755
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -505,7 +505,7 @@ S32 LLDrawPoolAvatar::getNumDeferredPasses()
{
if (LLPipeline::sImpostorRender)
{
- return 3;
+ return 19;
}
else
{
@@ -690,28 +690,15 @@ void LLDrawPoolAvatar::beginDeferredImpostor()
LLVOAvatar::sNumVisibleAvatars = 0;
}
-#if DEFERRED_IMPOSTORS
sVertexProgram = &gDeferredImpostorProgram;
-
- specular_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::SPECULAR_MAP);
- normal_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::DEFERRED_NORMAL);
- sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
-#else
- sVertexProgram = &gImpostorProgram;
- sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
-#endif
- sVertexProgram->bind();
+ gPipeline.bindDeferredShader(*sVertexProgram);
sVertexProgram->setMinimumAlpha(0.01f);
}
void LLDrawPoolAvatar::endDeferredImpostor()
{
sShaderLevel = mVertexShaderLevel;
- sVertexProgram->disableTexture(LLViewerShaderMgr::DEFERRED_NORMAL);
- sVertexProgram->disableTexture(LLViewerShaderMgr::SPECULAR_MAP);
- sVertexProgram->disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
- sVertexProgram->unbind();
- gGL.getTexUnit(0)->activate();
+ gPipeline.unbindDeferredShader(*sVertexProgram);
}
void LLDrawPoolAvatar::beginDeferredRigid()
@@ -1268,7 +1255,6 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
if (impostor)
{
-#if DEFERRED_IMPOSTORS
if (LLPipeline::sRenderDeferred && !LLPipeline::sReflectionRender && avatarp->mImpostor.isComplete())
{
if (normal_channel > -1)
@@ -1280,7 +1266,6 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
avatarp->mImpostor.bindTexture(1, specular_channel);
}
}
-#endif
avatarp->renderImpostor(LLColor4U(255,255,255,255), sDiffuseChannel);
}
return;