diff options
| author | Graham Linden <graham@lindenlab.com> | 2013-06-14 09:41:33 -0700 |
|---|---|---|
| committer | Graham Linden <graham@lindenlab.com> | 2013-06-14 09:41:33 -0700 |
| commit | f04e9363b9daca52c1fd2e675c2646f7e1d05054 (patch) | |
| tree | 6ab37ca763d176780e776d3dbcb6f6315ad8f4b9 /indra/newview/pipeline.cpp | |
| parent | fec6ab591ef644ee8058742f16849ca9ff53c6a6 (diff) | |
NORSPEC-266 fix issues with observer feedback on edits of material map parameters
Diffstat (limited to 'indra/newview/pipeline.cpp')
| -rwxr-xr-x | indra/newview/pipeline.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 3255f5821f..8942092221 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1696,6 +1696,8 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima return 0; } + LLMaterial* mat = te->getMaterialParams().get(); + bool color_alpha = te->getColor().mV[3] < 0.999f; bool alpha = color_alpha; if (imagep) @@ -1703,9 +1705,9 @@ 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()) + if (alpha && mat) { - switch (te->getMaterialParams()->getDiffuseAlphaMode()) + switch (mat->getDiffuseAlphaMode()) { case 1: alpha = true; // Material's alpha mode is set to blend. Toss it into the alpha draw pool. @@ -1724,10 +1726,11 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima { return LLDrawPool::POOL_ALPHA; } - else if ((te->getBumpmap() || te->getShiny()) && !te->getMaterialParams().isNull()) + else if ((te->getBumpmap() || te->getShiny()) && (!mat || mat->getNormalID().isNull())) { return LLDrawPool::POOL_BUMP; - } else if (!te->getMaterialParams().isNull() && !alpha) + } + else if (mat && !alpha) { return LLDrawPool::POOL_MATERIALS; } |
