From 971513e7d3958f26fb2e04d3a2a586b2dc1fa368 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 23 Nov 2025 15:46:51 +0100 Subject: [PATCH] HWR_BlendMidtextureSurface: fix major performance regression big oopsie from my side this caused textures that werent translucent to be marked with translucent in a bunch of cases, which led to them being rendered in a slower path --- src/hardware/hw_main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hardware/hw_main.cpp b/src/hardware/hw_main.cpp index d28592ad1..8148d9df7 100644 --- a/src/hardware/hw_main.cpp +++ b/src/hardware/hw_main.cpp @@ -1250,6 +1250,8 @@ static inline boolean HWR_BlendMidtextureSurface(FSurfaceInfo *pSurf) case 256: if (gl_linedef->blendmode) blendmode = HWR_SurfaceBlend(gl_linedef->blendmode, R_GetLinedefTransTable(gl_linedef->alpha), pSurf); + else + blendmode = PF_Translucent; break; default: if (gl_linedef->blendmode) @@ -1261,6 +1263,8 @@ static inline boolean HWR_BlendMidtextureSurface(FSurfaceInfo *pSurf) } else if (gl_linedef->alpha >= 0 && gl_linedef->alpha < FRACUNIT) blendmode = HWR_TranstableToAlpha(R_GetLinedefTransTable(gl_linedef->alpha), pSurf); + else + blendmode = PF_Masked; break; } }