summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2023-07-18 13:01:50 -0700
committerCosmic Linden <cosmic@lindenlab.com>2023-07-18 13:22:29 -0700
commitf8139b1bc47fd7b930498e0b2b19676834521025 (patch)
tree55c4772560da6bda284eff630c37afa572dd66ce /indra/newview
parent66283201301b0e55336f4b20407fed811acdc739 (diff)
SL-20018: Fix PBR glow affected by Blinn-Phong alpha
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvovolume.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 08d2e99c40..e8623b1cc3 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -6484,12 +6484,15 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
}
}
- F32 te_alpha = te->getColor().mV[3];
+ F32 blinn_phong_alpha = te->getColor().mV[3];
bool use_legacy_bump = te->getBumpmap() && (te->getBumpmap() < 18) && (!mat || mat->getNormalID().isNull());
- bool opaque = te_alpha >= 0.999f;
- bool transparent = te_alpha < 0.999f;
+ bool blinn_phong_opaque = blinn_phong_alpha >= 0.999f;
+ bool blinn_phong_transparent = blinn_phong_alpha < 0.999f;
- is_alpha = (is_alpha || transparent) ? TRUE : FALSE;
+ if (!gltf_mat)
+ {
+ is_alpha = (is_alpha || blinn_phong_transparent) ? TRUE : FALSE;
+ }
if (gltf_mat || (mat && !hud_group))
{
@@ -6519,7 +6522,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
{
if (mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{
- if (opaque)
+ if (blinn_phong_opaque)
{
registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK);
}
@@ -6540,7 +6543,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
}
else
{
- if (opaque)
+ if (blinn_phong_opaque)
{
registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT);
}
@@ -6551,7 +6554,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
}
}
}
- else if (transparent)
+ else if (blinn_phong_transparent)
{
registerFace(group, facep, LLRenderPass::PASS_ALPHA);
}