From a73f3a073c681b77cd61779c3a271ac736d1220b Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 17 Apr 2026 17:39:50 +0200 Subject: [PATCH] hw_main: dont need to do sprite billboarding stuff with shearing enabled within HWR_SplitSprite --- src/hardware/hw_main.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/hardware/hw_main.cpp b/src/hardware/hw_main.cpp index e38b1b3c8..d2fc90472 100644 --- a/src/hardware/hw_main.cpp +++ b/src/hardware/hw_main.cpp @@ -3864,7 +3864,7 @@ static void HWR_SplitSprite(gl_vissprite_t *spr, const boolean papersprite) wallVerts[1].y = endbot; // The x and y only need to be adjusted in the case that it's not a papersprite - if (cv_glspritebillboarding.value && !papersprite) + if (cv_glspritebillboarding.value && !cv_glshearing.value && !papersprite) { // Get the x and z of the vertices so billboarding draws correctly realheight = realbot - realtop; @@ -4383,9 +4383,7 @@ static int CompareDrawNodePlanes(const void *p1, const void *p2) static void HWR_RenderDrawNodes(void) { size_t i = 0, run_start = 0; - static std::vector sortindex; - - sortindex.reserve(DRAWNODES_INIT_SIZE); + static std::vector sortindex(DRAWNODES_INIT_SIZE); // Array for storing the rendering order. // A list of indices into the drawnodes array. @@ -5712,7 +5710,7 @@ static void HWR_RenderFrame(boolean skybox, boolean drawsky) viewwindowy, (viewwindowx + viewwidth), (viewwindowy + viewheight), - ZCLIP_PLANE, clipping_distances[renderdist - 1]); + ZCLIP_PLANE, clipping_distances[renderdist - 1]); current_bsp_culling_distance = bsp_culling_distances[renderdist- 1]; } @@ -6091,7 +6089,8 @@ static void HWR_DoPostProcessor(void) } } - if (cv_glscreentextures.value != 2) // screen textures are needed for the rest of the effects + // screen textures are needed for the rest of the effects + if (cv_glscreentextures.value != 2) return; // Not supported in splitscreen - someone want to add support?