From 4fafa915069fa51dd0d244cb7e726aac5828e553 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Wed, 25 Oct 2023 16:51:44 +0200 Subject: [PATCH] gl: disable dithering with GLES 2.0 GLES 2.0 doesn't allow initialization of const arrays. Fixes MINIDUMP-1YP MINIDUMP-1YQ --- core/rend/gles/gles.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/rend/gles/gles.cpp b/core/rend/gles/gles.cpp index b43d51b2c..68eb0f965 100644 --- a/core/rend/gles/gles.cpp +++ b/core/rend/gles/gles.cpp @@ -306,7 +306,7 @@ void main() highp float w = 100000.0 * vtx_uv.z; #endif gl_FragDepth = log2(1.0 + max(w, -0.999999)) / 34.0; -#endif + #if DITHERING == 1 mediump float ditherTable[16] = float[]( 0.9375, 0.1875, 0.75, 0., @@ -319,6 +319,7 @@ void main() color += r / ditherColorMax; // avoid rounding color = floor(color * 255.) / 255.; +#endif #endif gl_FragColor = color; }