diff options
Diffstat (limited to 'indra/newview/llface.cpp')
-rwxr-xr-x | indra/newview/llface.cpp | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index eb78d42c35..63919630fc 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1316,28 +1316,44 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, LLColor4U color = tep->getColor(); if (rebuild_color) - { - if (tep) + { //decide if shiny goes in alpha channel of color + if (tep && + getPoolType() != LLDrawPool::POOL_ALPHA) // <--- alpha channel MUST contain transparency, not shiny { LLMaterial* mat = tep->getMaterialParams().get(); + + bool shiny_in_alpha = false; + + if (LLPipeline::sRenderDeferred) + { //store shiny in alpha if we don't have a specular map + if (!mat || mat->getSpecularID().isNull()) + { + shiny_in_alpha = true; + } + } + else + { + if (!mat || mat->getDiffuseAlphaMode() != LLMaterial::DIFFUSE_ALPHA_MODE_MASK) + { + shiny_in_alpha = true; + } + } - GLfloat alpha[4] = + if (shiny_in_alpha) { - 0.00f, - 0.25f, - 0.5f, - 0.75f - }; + + GLfloat alpha[4] = + { + 0.00f, + 0.25f, + 0.5f, + 0.75f + }; - if ((!LLPipeline::sRenderDeferred || !mat || mat->getSpecularID().isNull()) && - getPoolType() != LLDrawPool::POOL_ALPHA && - (LLPipeline::sRenderDeferred || (LLPipeline::sRenderBump && tep->getShiny()))) - { llassert(tep->getShiny() <= 3); color.mV[3] = U8 (alpha[tep->getShiny()] * 255); } } - } // INDICES @@ -2117,11 +2133,10 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, LLVector4a src; - U32 glow32 = glow | - (glow << 8) | - (glow << 16) | - (glow << 24); + LLColor4U glow4u = LLColor4U(0,0,0,glow); + U32 glow32 = glow4u.mAll; + U32 vec[4]; vec[0] = vec[1] = vec[2] = vec[3] = glow32; |