From d407aa3157cfaf637f498f5f44e3e2c271d825d5 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Thu, 13 Apr 2017 22:16:26 +0200 Subject: [PATCH] - Fix linear filtering bug for sprites --- src/swrenderer/drawers/r_draw_sprite32.h | 2 +- src/swrenderer/drawers/r_draw_sprite32_sse2.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/swrenderer/drawers/r_draw_sprite32.h b/src/swrenderer/drawers/r_draw_sprite32.h index f042bac312..59b04b6479 100644 --- a/src/swrenderer/drawers/r_draw_sprite32.h +++ b/src/swrenderer/drawers/r_draw_sprite32.h @@ -126,7 +126,7 @@ namespace swrenderer } int textureheight = args.TextureHeight(); - uint32_t one = ((0x80000000 + textureheight - 1) / textureheight) * 2 + 1; + uint32_t one = ((0x20000000 + textureheight - 1) / textureheight) * 2 + 1; // Shade constants BgraColor dynlight = args.DynamicLight(); diff --git a/src/swrenderer/drawers/r_draw_sprite32_sse2.h b/src/swrenderer/drawers/r_draw_sprite32_sse2.h index 3d728d2c98..d8afc3ae94 100644 --- a/src/swrenderer/drawers/r_draw_sprite32_sse2.h +++ b/src/swrenderer/drawers/r_draw_sprite32_sse2.h @@ -126,7 +126,7 @@ namespace swrenderer } int textureheight = args.TextureHeight(); - uint32_t one = ((0x80000000 + textureheight - 1) / textureheight) * 2 + 1; + uint32_t one = ((0x20000000 + textureheight - 1) / textureheight) * 2 + 1; // Shade constants __m128i dynlight = _mm_cvtsi32_si128(args.DynamicLight());