summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2024-11-12 20:58:29 -0500
committerGitHub <noreply@github.com>2024-11-12 17:58:29 -0800
commitc654dac4b7593355a5754042d0b43e03924b3efb (patch)
tree4e1f23786605b84a55fee26ee9a8c01361fa67b0
parent2b255535efbce4634cdd2c671f597774e1783372 (diff)
#3059 Backport to ExtraFPS. (#3082)
-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
{