File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -5925,7 +5925,24 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
5925
5925
{
5926
5926
if (gltf_mat != nullptr )
5927
5927
{
5928
- add_face (sPbrFaces , pbr_count, facep);
5928
+ // In theory, we should never actually get here with alpha blending.
5929
+ // How this is supposed to work is we check if the surface is alpha blended, and we assign it to the alpha draw pool.
5930
+ // For rigged meshes, this apparently may not happen consistently.
5931
+ // For now, just discard it here if the alpha is 0 (fully transparent) to achieve parity with blinn-phong materials in function.
5932
+
5933
+ bool should_render = true ;
5934
+ if (gltf_mat->mAlphaMode == LLGLTFMaterial::ALPHA_MODE_BLEND)
5935
+ {
5936
+ if (gltf_mat->mBaseColor .mV [3 ] == 0 .0f )
5937
+ {
5938
+ should_render = false ;
5939
+ }
5940
+ }
5941
+
5942
+ if (should_render)
5943
+ {
5944
+ add_face (sPbrFaces , pbr_count, facep);
5945
+ }
5929
5946
}
5930
5947
else
5931
5948
{
You can’t perform that action at this time.
0 commit comments