Force the correct depth and blend modes with PT polys

This commit is contained in:
Luke Benstead 2021-05-23 13:15:07 +01:00
parent 0789ea99b3
commit cde0abd18d

View File

@ -1133,6 +1133,13 @@ GL_FORCE_INLINE void push(PolyHeader* header, GLboolean multiTextureHeader, Poly
PolyContext cxt = *_glGetPVRContext();
cxt.list_type = activePolyList->list_type;
/* Punch-through polys require fixed blending and depth modes */
if(cxt.list_type == GPU_LIST_PT_POLY) {
cxt.blend.src = GPU_BLEND_SRCALPHA;
cxt.blend.dst = GPU_BLEND_INVSRCALPHA;
cxt.depth.comparison = GPU_DEPTHCMP_LEQUAL;
}
_glUpdatePVRTextureContext(&cxt, textureUnit);
if(multiTextureHeader) {