Alphamasking migrated to shaders instead of using fixed-function. Very early code. Hasn't even made it into viewer-development yet.
This commit is contained in:
@@ -397,7 +397,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);
|
||||
|
||||
@@ -637,12 +637,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();
|
||||
}
|
||||
|
||||
@@ -652,16 +662,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
|
||||
@@ -694,6 +705,7 @@ void LLDrawPoolAvatar::beginDeferredImpostor()
|
||||
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||
|
||||
sVertexProgram->bind();
|
||||
sVertexProgram->setAlphaRange(0.01f, 1.f);
|
||||
}
|
||||
|
||||
void LLDrawPoolAvatar::endDeferredImpostor()
|
||||
@@ -739,11 +751,11 @@ void LLDrawPoolAvatar::beginSkinned()
|
||||
{
|
||||
if (LLPipeline::sUnderWaterRender)
|
||||
{
|
||||
sVertexProgram = &gObjectSimpleNonIndexedWaterProgram;
|
||||
sVertexProgram = &gObjectAlphaMaskNonIndexedWaterProgram;
|
||||
}
|
||||
else
|
||||
{
|
||||
sVertexProgram = &gObjectSimpleNonIndexedProgram;
|
||||
sVertexProgram = &gObjectAlphaMaskNonIndexedProgram;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -775,6 +787,11 @@ void LLDrawPoolAvatar::beginSkinned()
|
||||
sVertexProgram->bind();
|
||||
}
|
||||
}
|
||||
|
||||
if (LLGLSLShader::sNoFixedFunction)
|
||||
{
|
||||
sVertexProgram->setAlphaRange(0.2f, 1.f);
|
||||
}
|
||||
}
|
||||
|
||||
void LLDrawPoolAvatar::endSkinned()
|
||||
|
||||
Reference in New Issue
Block a user