From eccd42ef4328f43b7ba687d14ecbdcd50b371507 Mon Sep 17 00:00:00 2001
From: sphere <spherallic@gmail.com>
Date: Sun, 6 Jun 2021 14:34:49 +0200
Subject: [PATCH] Do the same for OpenGL, and also make modulate actually work
 in it.

---
 src/hardware/hw_main.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c
index 9e02a260c..46e1b6ddb 100644
--- a/src/hardware/hw_main.c
+++ b/src/hardware/hw_main.c
@@ -1469,19 +1469,12 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
 				case 256:
 					blendmode = PF_Translucent;
 					break;
-				case 913:
-					blendmode = PF_Multiplicative;
-					Surf.PolyColor.s.alpha = 0xff;
-					break;
 				default:
 				{
 					UINT32 blend = 0;
 					transnum_t transtable = R_GetLinedefTransTable(gl_linedef);
-					if (transtable == NUMTRANSMAPS)
+					if ((blend = gl_linedef->blendmode) && (transtable == NUMTRANSMAPS || blendmode == AST_MODULATE))
 						transtable = 0;
-					if (gl_linedef->blendmode == AST_ADD || gl_linedef->blendmode == AST_SUBTRACT || gl_linedef->blendmode == AST_REVERSESUBTRACT)
-						blend = gl_linedef->blendmode;
-
 					blendmode = HWR_SurfaceBlend(blend, transtable, &Surf);
 					break;
 				}
-- 
GitLab