From e7cdcd9c0af6d82c8acc7c14102fbc8c4e34da1e Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sat, 18 Jun 2016 05:20:34 +0200 Subject: [PATCH] Change to one pass rendering to remove fuzz artifact --- src/r_draw_rgba.cpp | 6 ++++-- src/r_draw_rgba.h | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/r_draw_rgba.cpp b/src/r_draw_rgba.cpp index b1ee1f02c4..6021c9265d 100644 --- a/src/r_draw_rgba.cpp +++ b/src/r_draw_rgba.cpp @@ -624,8 +624,6 @@ public: // Handle the case where we would go out of bounds at the top: if (yl < fuzzstep) { - count--; - uint32_t bg = dest[fuzzoffset[fuzz] * fuzzstep + pitch]; uint32_t bg_red = (bg >> 16) & 0xff; uint32_t bg_green = (bg >> 8) & 0xff; @@ -639,6 +637,10 @@ public: dest += pitch; fuzz += fuzzstep; fuzz %= FUZZTABLE; + + count--; + if (count == 0) + return; } bool lowerbounds = (yl + count * fuzzstep > _fuzzviewheight); diff --git a/src/r_draw_rgba.h b/src/r_draw_rgba.h index 15a76c6892..83977d65c1 100644 --- a/src/r_draw_rgba.h +++ b/src/r_draw_rgba.h @@ -209,8 +209,8 @@ class DrawerCommandQueue int threaded_render = 0; DrawerThread single_core_thread; - int num_passes = 2; - int rows_in_pass = 540; + int num_passes = 1; + int rows_in_pass = MAXHEIGHT; void StartThreads(); void StopThreads();