summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvovolume.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 253fb01219..b234b5a9af 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -5862,7 +5862,23 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
{
if (gltf_mat != nullptr)
{
- add_face(sPbrFaces, pbr_count, facep);
+ // In theory, we should never actually get here with alpha blending.
+ // How this is supposed to work is we check if the surface is alpha blended, and we assign it to the
+ // alpha draw pool. For rigged meshes, this apparently may not happen consistently. For now, just
+ // discard it here if the alpha is 0 (fully transparent) to achieve parity with blinn-phong materials in
+ // function.
+ bool should_render = true;
+ if (gltf_mat->mAlphaMode == LLGLTFMaterial::ALPHA_MODE_BLEND)
+ {
+ if (gltf_mat->mBaseColor.mV[3] == 0.0f)
+ {
+ should_render = false;
+ }
+ }
+ if (should_render)
+ {
+ add_face(sPbrFaces, pbr_count, facep);
+ }
}
else
{