DRTVWR-559 Fix for bad vertex data getting sent to PBR alpha shader (auto alpha mask regression).

meow-7.2.2
RunitaiLinden 2023-04-19 18:15:28 -05:00
parent 45fdba8fd9
commit aaedacf3f3
2 changed files with 14 additions and 7 deletions

View File

@ -1081,21 +1081,27 @@ void LLFace::updateRebuildFlags()
bool LLFace::canRenderAsMask()
{
if (LLPipeline::sNoAlpha)
const LLTextureEntry* te = getTextureEntry();
if( !te || !getViewerObject() || !getTexture() )
{
return true;
return false;
}
if (te->getGLTFRenderMaterial())
{
return false;
}
if (LLPipeline::sNoAlpha)
{
return true;
}
if (isState(LLFace::RIGGED))
{ // never auto alpha-mask rigged faces
return false;
}
const LLTextureEntry* te = getTextureEntry();
if( !te || !getViewerObject() || !getTexture() )
{
return false;
}
LLMaterial* mat = te->getMaterialParams();
if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)

View File

@ -5467,6 +5467,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
draw_info->validate();
}
llassert(info->mGLTFMaterial == nullptr || (info->mVertexBuffer->getTypeMask() & LLVertexBuffer::MAP_TANGENT) != 0);
llassert(type != LLPipeline::RENDER_TYPE_PASS_GLTF_PBR || info->mGLTFMaterial != nullptr);
llassert(type != LLPipeline::RENDER_TYPE_PASS_GLTF_PBR_RIGGED || info->mGLTFMaterial != nullptr);
llassert(type != LLPipeline::RENDER_TYPE_PASS_GLTF_PBR_ALPHA_MASK || info->mGLTFMaterial != nullptr);