diff options
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index c0df34d3ac..5d5c7f9aae 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5861,7 +5861,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 { |