summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcosmic-linden <111533034+cosmic-linden@users.noreply.github.com>2023-07-18 13:34:59 -0700
committerGitHub <noreply@github.com>2023-07-18 13:34:59 -0700
commit8e3d4048d4197a40009f04169aeb3ec710cd6fa1 (patch)
tree84c68cf5f7d7c7eac7db5fbba1324e9f35b57208
parentca247e9a8003c11e8a0c49a68a24944539ec5e02 (diff)
parentf8139b1bc47fd7b930498e0b2b19676834521025 (diff)
Merge pull request #291 from secondlife/SL-20018
SL-20018: Fix PBR glow affected by Blinn-Phong alpha
-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 4c70874bc9..c55254237a 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -6490,12 +6490,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))
{
@@ -6525,7 +6528,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);
}
@@ -6546,7 +6549,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
}
else
{
- if (opaque)
+ if (blinn_phong_opaque)
{
registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT);
}
@@ -6557,7 +6560,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
}
}
}
- else if (transparent)
+ else if (blinn_phong_transparent)
{
registerFace(group, facep, LLRenderPass::PASS_ALPHA);
}