aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/GPU3D_Soft.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/GPU3D_Soft.cpp b/src/GPU3D_Soft.cpp
index 6dd5676..888b823 100644
--- a/src/GPU3D_Soft.cpp
+++ b/src/GPU3D_Soft.cpp
@@ -924,6 +924,7 @@ void RenderPolygon(Polygon* polygon)
u8 alpha = color >> 24;
// alpha test
+ // TODO: check alpha test when blending is disabled
if (DispCnt & (1<<2))
{
if (alpha <= AlphaRef) continue;
@@ -933,11 +934,6 @@ void RenderPolygon(Polygon* polygon)
if (alpha == 0) continue;
}
- // alpha blending disable
- // TODO: check alpha test when blending is disabled
- if (!(DispCnt & (1<<3)))
- alpha = 31;
-
if (alpha == 31)
{
// edge fill rules for opaque pixels
@@ -967,7 +963,7 @@ void RenderPolygon(Polygon* polygon)
u32 dstcolor = ColorBuffer[pixeladdr];
u32 dstalpha = dstcolor >> 24;
- if (dstalpha > 0)
+ if ((dstalpha > 0) && (DispCnt & (1<<3)))
{
u32 srcR = color & 0x3F;
u32 srcG = (color >> 8) & 0x3F;