Added some missing drawpool determination logic pertaining to face materials.
This commit is contained in:
@@ -1415,12 +1415,32 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool alpha = te->getColor().mV[3] < 0.999f;
|
||||
LLMaterial* mat = te->getMaterialParams().get();
|
||||
|
||||
bool color_alpha = te->getColor().mV[3] < 0.999f;
|
||||
bool alpha = color_alpha;
|
||||
if (imagep)
|
||||
{
|
||||
alpha = alpha || (imagep->getComponents() == 4 && imagep->getType() != LLViewerTexture::MEDIA_TEXTURE) || (imagep->getComponents() == 2);
|
||||
}
|
||||
|
||||
|
||||
if (alpha && mat)
|
||||
{
|
||||
switch (mat->getDiffuseAlphaMode())
|
||||
{
|
||||
case 1:
|
||||
alpha = true; // Material's alpha mode is set to blend. Toss it into the alpha draw pool.
|
||||
break;
|
||||
case 0: //alpha mode set to none, never go to alpha pool
|
||||
case 3: //alpha mode set to emissive, never go to alpha pool
|
||||
alpha = color_alpha;
|
||||
break;
|
||||
default: //alpha mode set to "mask", go to alpha pool if fullbright
|
||||
alpha = color_alpha; // 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;
|
||||
|
||||
Reference in New Issue
Block a user