From da71b42453ec7db3c623b3fa3c820b3af2210d2d Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 16 Jun 2026 12:31:53 +0200 Subject: [PATCH] add credit to bayer dither shader sources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit completely forgot about this (sry!) the original implementation was mostly based on hughsk´s 8x8 bayer shader while the current is mostly adapted from the libretro 4x4 bayer shader --- src/hardware/hw_shaders.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hardware/hw_shaders.h b/src/hardware/hw_shaders.h index 5929af733..565c2bef1 100644 --- a/src/hardware/hw_shaders.h +++ b/src/hardware/hw_shaders.h @@ -104,6 +104,11 @@ // // Include GLSL_FLOOR_FUDGES or GLSL_WALL_FUDGES or define the fudges in shaders that use this macro. + +// dither shader based on +// https://github.com/hughsk/glsl-dither/blob/master/8x8.glsl +// https://github.com/libretro/glsl-shaders/blob/master/dithering/shaders/bayer_4x4.glsl +// adapted and messed about to work with srb2 and scale per resolution #define GLSL_DOOM_COLORMAP_DITHER \ "float baseValue = max(startmap * STARTMAP_FUDGE - scale * 0.5 * SCALE_FUDGE, cap);\n" \ "float patscale = min(scr_resolution.x / 1280.0, scr_resolution.y / 720.0);\n" \