From 8a3a8b7c684996d2ea72a95e5abd62b1e763f344 Mon Sep 17 00:00:00 2001 From: RSDuck Date: Fri, 22 Jan 2021 12:19:46 +0100 Subject: [PATCH] include polygon attr opaqueness for translucent polygons in render key --- src/GPU3D_OpenGL.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/GPU3D_OpenGL.cpp b/src/GPU3D_OpenGL.cpp index f24567c3..381af9d6 100644 --- a/src/GPU3D_OpenGL.cpp +++ b/src/GPU3D_OpenGL.cpp @@ -474,6 +474,7 @@ void SetupPolygon(RendererPolygon* rp, Polygon* polygon) // - depthfunc // -- depthwrite // --- polyID + // ---- need opaque // shadow mask polygons: // - depthfunc????? // shadow polygons: @@ -491,6 +492,8 @@ void SetupPolygon(RendererPolygon* rp, Polygon* polygon) rp->RenderKey |= (polygon->Attr >> 10) & 0x2; // bit11 - depth write rp->RenderKey |= (polygon->Attr >> 13) & 0x4; // bit15 - fog rp->RenderKey |= (polygon->Attr & 0x3F000000) >> 16; // polygon ID + if ((polygon->Attr & 0x001F0000) == 0x001F0000) // need opaque + rp->RenderKey |= 0x4000; } else {