Skip to content

Commit c654dac

Browse files
authored
#3059 Backport to ExtraFPS. (#3082)
1 parent 2b25553 commit c654dac

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

indra/newview/llvovolume.cpp

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5862,7 +5862,23 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
58625862
{
58635863
if (gltf_mat != nullptr)
58645864
{
5865-
add_face(sPbrFaces, pbr_count, facep);
5865+
// In theory, we should never actually get here with alpha blending.
5866+
// How this is supposed to work is we check if the surface is alpha blended, and we assign it to the
5867+
// alpha draw pool. For rigged meshes, this apparently may not happen consistently. For now, just
5868+
// discard it here if the alpha is 0 (fully transparent) to achieve parity with blinn-phong materials in
5869+
// function.
5870+
bool should_render = true;
5871+
if (gltf_mat->mAlphaMode == LLGLTFMaterial::ALPHA_MODE_BLEND)
5872+
{
5873+
if (gltf_mat->mBaseColor.mV[3] == 0.0f)
5874+
{
5875+
should_render = false;
5876+
}
5877+
}
5878+
if (should_render)
5879+
{
5880+
add_face(sPbrFaces, pbr_count, facep);
5881+
}
58665882
}
58675883
else
58685884
{

0 commit comments

Comments
 (0)