SL-19297 Hacky fix for MY EYES!

meow-7.2.2
Dave Parks 2023-03-22 13:49:33 -05:00
parent 09ed1ede8d
commit c97b6034ee
1 changed files with 8 additions and 1 deletions

View File

@ -6655,12 +6655,19 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
LLRenderPass::PASS_NORMSPEC_EMISSIVE,
};
U32 mask = mat->getShaderMask();
U32 alpha_mode = mat->getDiffuseAlphaMode();
if (!distance_sort && alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)
{ // HACK - this should never happen, but sometimes we get a material that thinks it has alpha blending when it ought not
alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
}
U32 mask = mat->getShaderMask(alpha_mode);
llassert(mask < sizeof(pass)/sizeof(U32));
mask = llmin(mask, (U32)(sizeof(pass)/sizeof(U32)-1));
// if this is going into alpha pool, distance sort MUST be true
llassert(pass[mask] == LLRenderPass::PASS_ALPHA ? distance_sort : true);
registerFace(group, facep, pass[mask]);
}
}