From c82eb39d54aa9a15e872b0d242c2f94036282a00 Mon Sep 17 00:00:00 2001 From: mittorn Date: Sat, 23 Mar 2019 00:49:46 +0700 Subject: [PATCH] ref_soft: Skip sky and transparent surfaces (increase FPS) --- r_rast.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/r_rast.c b/r_rast.c index 11ebef2d..5903e960 100644 --- a/r_rast.c +++ b/r_rast.c @@ -551,20 +551,20 @@ void R_RenderFace (msurface_t *fa, int clipflags) clipplane_t *pclip; // translucent surfaces are not drawn by the edge renderer -/* if (fa->texinfo->flags & (SURF_TRANS33|SURF_TRANS66)) + if (fa->flags & (SURF_DRAWTURB|SURF_TRANSPARENT)) { - fa->nextalphasurface = r_alpha_surfaces; - r_alpha_surfaces = fa; + //fa->nextalphasurface = r_alpha_surfaces; + //r_alpha_surfaces = fa; return; - }*/ + } // sky surfaces encountered in the world will cause the // environment box surfaces to be emited -/* if ( fa->texinfo->flags & SURF_SKY ) + if ( fa->flags & SURF_DRAWSKY ) { - R_EmitSkyBox (); + //R_EmitSkyBox (); return; - }*/ + } // skip out if no more surfs if ((surface_p) >= surf_max)