FIRE-31986: Undo some alpha rendering optimizations which in the end seem to cause more issues and strange/different behavior compared to the LL viewer

master
Ansariel 2022-08-25 10:09:42 +02:00
parent 90c3e57768
commit 074c2acb74
2 changed files with 2 additions and 18 deletions

View File

@ -1232,11 +1232,6 @@ bool LLFace::canRenderAsMask()
{
return false;
}
// <FS:Beq> shortcircuit fully alpha faces
if (getViewerObject()->isHUDAttachment()) { return false; }
if (te->getAlpha() == 0.0f && (te->getGlow() == 0.f)) { return true; }
// </FS:Beq>
LLMaterial* mat = te->getMaterialParams();
if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)

View File

@ -5664,7 +5664,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
}
}
// if (type == LLRenderPass::PASS_ALPHA) // <FS:Beq> allow tracking through pipeline
if (type == LLRenderPass::PASS_ALPHA)
{ //for alpha sorting
facep->setDrawInfo(draw_info);
}
@ -6617,14 +6617,6 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
LLFace* facep = *face_iter;
LLViewerTexture* tex = facep->getTexture();
const LLTextureEntry* te = facep->getTextureEntry();
// <FS:Beq> Don't batch fully transparent faces
if (te && ( te->getAlpha() == 0.f ) && ( te->getGlow() == 0.0 ) && !LLDrawPoolAlpha::sShowDebugAlpha)
{
facep->setSize(0,0);
++face_iter;
continue;
}
// </FS:Beq>
LLMaterialPtr mat = te->getMaterialParams();
LLMaterialID matId = te->getMaterialID();
@ -7029,10 +7021,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
else if (is_alpha)
{
// can we safely treat this as an alpha mask?
// <FS:Beq> Nothing actually sets facecolor use the TE alpha instead.
// if (facep->getFaceColor().mV[3] <= 0.f)
if ((te->getAlpha() <= 0.f || facep->getFaceColor().mV[3] <= 0.f) && te->getGlow() == 0.0 && !LLDrawPoolAlpha::sShowDebugAlpha)
// </FS:Beq>
if (facep->getFaceColor().mV[3] <= 0.f)
{ //100% transparent, don't render unless we're highlighting transparent
LL_PROFILE_ZONE_NAMED_CATEGORY_VOLUME("facep->alpha -> invisible");
registerFace(group, facep, LLRenderPass::PASS_ALPHA_INVISIBLE);