summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 51925b4129..7a73ee1339 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -5296,13 +5296,14 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
if (mat)
{
+ BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) || (facep->getTextureEntry()->getColor().mV[3] < 0.999f) ? TRUE : FALSE;
if (type == LLRenderPass::PASS_ALPHA)
{
- shader_mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND);
+ shader_mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND, is_alpha);
}
else
{
- shader_mask = mat->getShaderMask();
+ shader_mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_DEFAULT, is_alpha);
}
}
@@ -5857,15 +5858,18 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
else
{
- if (te->getColor().mV[3] > 0.f || te->getGlow() > 0.f)
- { //only treat as alpha in the pipeline if < 100% transparent
- drawablep->setState(LLDrawable::HAS_ALPHA);
- add_face(sAlphaFaces, alpha_count, facep);
- }
- else if (LLDrawPoolAlpha::sShowDebugAlpha)
- {
- add_face(sAlphaFaces, alpha_count, facep);
- }
+ if (te->getColor().mV[3] > 0.f || te->getGlow() > 0.f)
+ { //only treat as alpha in the pipeline if < 100% transparent
+ drawablep->setState(LLDrawable::HAS_ALPHA);
+ add_face(sAlphaFaces, alpha_count, facep);
+ }
+ else if (LLDrawPoolAlpha::sShowDebugAlpha ||
+ (gPipeline.sRenderHighlight &&
+ (LLPipeline::getRenderScriptedBeacons() || LLPipeline::getRenderScriptedTouchBeacons()) &&
+ drawablep->getVObj() && drawablep->getVObj()->flagScripted()))
+ { //draw the transparent face for debugging purposes using a custom texture
+ add_face(sAlphaFaces, alpha_count, facep);
+ }
}
}
else
@@ -6692,7 +6696,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
LLRenderPass::PASS_NORMSPEC_EMISSIVE,
};
- U32 mask = mat->getShaderMask();
+ U32 mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_DEFAULT, is_alpha);
llassert(mask < sizeof(pass)/sizeof(U32));