summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-02-15 18:35:34 -0500
committerOz Linden <oz@lindenlab.com>2013-02-15 18:35:34 -0500
commit1b4a585af6de4af5f861a5e83842b0464082c8fd (patch)
tree07794c2d6ad4e7d9459d1ad5aff5d7ba0173362b /indra/newview
parent64a4a13397ea7b895ebbeb707bdba72e2d97ff6b (diff)
parentec3b4e05a43fec4414924eb92a483bc164fb0ec2 (diff)
merge latest rendering fixes
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lldrawpoolmaterials.cpp7
-rw-r--r--indra/newview/pipeline.cpp15
2 files changed, 19 insertions, 3 deletions
diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp
index c5f4740afc..52f476f589 100644
--- a/indra/newview/lldrawpoolmaterials.cpp
+++ b/indra/newview/lldrawpoolmaterials.cpp
@@ -68,20 +68,23 @@ void LLDrawPoolMaterials::renderDeferred(S32 pass)
switch (params.mDiffuseAlphaMode)
{
case 0:
- LL_DEBUGS("Asdf") << "Renderererererrerererrrr!!!~!!!~!~" << LL_ENDL;
mShader = &gDeferredMaterialShinyNormal;
+ mShader->bind();
break;
case 1: // Alpha blending not supported in the opaque draw pool.
return;
case 2:
mShader = &gDeferredMaterialShinyNormalAlphaTest;
+ mShader->bind();
+ mShader->setMinimumAlpha(params.mAlphaMaskCutoff);
break;
case 3:
mShader = &gDeferredMaterialShinyNormalEmissive;
+ mShader->bind();
break;
};
- mShader->bind();
+
mShader->uniform4f(LLShaderMgr::SPECULAR_COLOR, params.mSpecColor.mV[0], params.mSpecColor.mV[1], params.mSpecColor.mV[2], params.mSpecColor.mV[3]);
mShader->uniform1f(LLShaderMgr::ENVIRONMENT_INTENSITY, params.mEnvIntensity);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 6e585bc60a..8b9e02946b 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1596,7 +1596,20 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima
{
alpha = alpha || (imagep->getComponents() == 4 && imagep->getType() != LLViewerTexture::MEDIA_TEXTURE) || (imagep->getComponents() == 2);
}
-
+
+ if (alpha && te->getMaterialParams())
+ {
+ switch (te->getMaterialParams()->getDiffuseAlphaMode())
+ {
+ case 1:
+ alpha = true; // Material's alpha mode is set to blend. Toss it into the alpha draw pool.
+ break;
+ default:
+ alpha = false; // Material's alpha mode is set to none, mask, or emissive. Toss it into the opaque material draw pool.
+ break;
+ }
+ }
+
if (alpha)
{
return LLDrawPool::POOL_ALPHA;