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
This commit is contained in:
Alug committed 2025-11-23 15:47:03 +01:00
1 parent 03929e551f
commit 971513e7d3
1 file changed
+4
+4
View File
@@ -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;
}
}