diff --git a/core/rend/gles/gldraw.cpp b/core/rend/gles/gldraw.cpp index 51c1a2ca8..e15d776d6 100644 --- a/core/rend/gles/gldraw.cpp +++ b/core/rend/gles/gldraw.cpp @@ -179,7 +179,7 @@ template __forceinline void SetGPState(const PolyParam* gp,u32 cflip=0) { - if (gp->pcw.Texture && gp->tsp.FilterMode > 1) + if (gp->pcw.Texture && gp->tsp.FilterMode > 1 && Type != ListType_Punch_Through) { ShaderUniforms.trilinear_alpha = 0.25 * (gp->tsp.MipMapD & 0x3); if (gp->tsp.FilterMode == 2) @@ -237,7 +237,8 @@ __forceinline glcache.TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); } - if (Type==ListType_Translucent) + // Apparently punch-through polys support blending, or at least some combinations + if (Type == ListType_Translucent || Type == ListType_Punch_Through) { glcache.Enable(GL_BLEND); glcache.BlendFunc(SrcBlendGL[gp->tsp.SrcInstr],DstBlendGL[gp->tsp.DstInstr]); diff --git a/core/rend/gles/gles.cpp b/core/rend/gles/gles.cpp index fe54b88ba..e619c9b5f 100644 --- a/core/rend/gles/gles.cpp +++ b/core/rend/gles/gles.cpp @@ -271,10 +271,6 @@ void main() \n\ #if pp_IgnoreTexA==1 \n\ texcol.a=1.0; \n\ #endif\n\ - \n\ - #if cp_AlphaTest == 1 \n\ - if (cp_AlphaTestValue>texcol.a) discard;\n\ - #endif \n\ #endif \n\ #if pp_ShadInstr==0 \n\ { \n\ @@ -298,6 +294,11 @@ void main() \n\ } \n\ #endif\n\ \n\ + #if cp_AlphaTest == 1 \n\ + if (cp_AlphaTestValue > color.a) \n\ + discard; \n\ + #endif \n\ + \n\ #if pp_Offset==1 && pp_BumpMap == 0 \n\ { \n\ color.rgb+=vtx_offs.rgb; \n\