Always make sure we send opaque polys with one/zero blending

This commit is contained in:
Luke Benstead 2021-05-23 20:58:01 +01:00
parent 7376d3e625
commit f736332eb8

View File

@ -1133,8 +1133,12 @@ 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) {
if(cxt.list_type == GPU_LIST_OP_POLY) {
/* Opaque polys are always one/zero */
cxt.blend.src = GPU_BLEND_ONE;
cxt.blend.dst = GPU_BLEND_ZERO;
} else if(cxt.list_type == GPU_LIST_PT_POLY) {
/* Punch-through polys require fixed blending and depth modes */
cxt.blend.src = GPU_BLEND_SRCALPHA;
cxt.blend.dst = GPU_BLEND_INVSRCALPHA;
cxt.depth.comparison = GPU_DEPTHCMP_LEQUAL;