From 9eef02a1e81ce0244936722bc340b90be49c345c Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Sun, 7 Jul 2019 22:13:43 +0200 Subject: [PATCH] pvr: ignore Z Write Disable for punch-through polys? tentative fix for Worms World Party --- core/rend/gl4/gldraw.cpp | 8 +++++++- core/rend/gles/gldraw.cpp | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/core/rend/gl4/gldraw.cpp b/core/rend/gl4/gldraw.cpp index ee3e72694..cfe1302be 100644 --- a/core/rend/gl4/gldraw.cpp +++ b/core/rend/gl4/gldraw.cpp @@ -245,7 +245,13 @@ template // Depth buffer is updated in pass 0 (and also in pass 1 for OP PT) if (pass < 2) - glcache.DepthMask(!gp->isp.ZWriteDis); + { + // Ignore ZWriteDis for punch-through? fixes Worms World Party + if (Type == ListType_Punch_Through) + glcache.DepthMask(GL_TRUE); + else + glcache.DepthMask(!gp->isp.ZWriteDis); + } else glcache.DepthMask(GL_FALSE); } diff --git a/core/rend/gles/gldraw.cpp b/core/rend/gles/gldraw.cpp index 2a1b76cd1..4f0c746ce 100644 --- a/core/rend/gles/gldraw.cpp +++ b/core/rend/gles/gldraw.cpp @@ -263,7 +263,13 @@ __forceinline if (SortingEnabled && !settings.rend.PerStripSorting) glcache.DepthMask(GL_FALSE); else - glcache.DepthMask(!gp->isp.ZWriteDis); + { + // Ignore ZWriteDis for punch-through? fixes Worms World Party + if (Type == ListType_Punch_Through) + glcache.DepthMask(GL_TRUE); + else + glcache.DepthMask(!gp->isp.ZWriteDis); + } } template