From 01c41c367c0a20c52c1ec158abbbdbafa5337995 Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Sat, 31 Aug 2024 00:05:18 +0200 Subject: [PATCH] Avoid potentially applying dithering twice for softemu 1 --- Quake/gl_rmain.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Quake/gl_rmain.c b/Quake/gl_rmain.c index 124620cab..29d3c5584 100644 --- a/Quake/gl_rmain.c +++ b/Quake/gl_rmain.c @@ -930,16 +930,21 @@ void R_SetupView (void) r_framedata.eyepos[1] = r_refdef.vieworg[1]; r_framedata.eyepos[2] = r_refdef.vieworg[2]; r_framedata.time = cl.time; - if (softemu == SOFTEMU_FINE || softemu == SOFTEMU_COARSE) + if (softemu == SOFTEMU_COARSE) { r_framedata.screendither = NOISESCALE * r_dither.value * r_softemu_dither_screen.value; r_framedata.texturedither = NOISESCALE * r_dither.value * r_softemu_dither_texture.value; } - else + else if (softemu == SOFTEMU_OFF) { r_framedata.screendither = r_dither.value * (1.f/255.f); r_framedata.texturedither = 0.f; } + else // FINE (screen-space dithering applied during postprocessing), or BANDED (no dithering) + { + r_framedata.screendither = 0.f; + r_framedata.texturedither = 0.f; + } Fog_SetupFrame (); //johnfitz Sky_SetupFrame ();