SL-20254: Fix blinn-phong alpha of 0 making GLTF materials invisible for non-root prims.

meow-7.2.2
Cosmic Linden 2023-10-03 17:24:46 -07:00 committed by cosmic-linden
parent 50133bdebe
commit 70abb3085d
1 changed files with 10 additions and 1 deletions

View File

@ -5856,7 +5856,16 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
else
{
if (te->getColor().mV[3] > 0.f || te->getGlow() > 0.f)
F32 alpha;
if (is_pbr)
{
alpha = gltf_mat ? gltf_mat->mBaseColor.mV[3] : 1.0;
}
else
{
alpha = te->getColor().mV[3];
}
if (alpha > 0.f || te->getGlow() > 0.f)
{ //only treat as alpha in the pipeline if < 100% transparent
drawablep->setState(LLDrawable::HAS_ALPHA);
add_face(sAlphaFaces, alpha_count, facep);