From 3ba6c1e42b35b82f3b362bbce2a99dd6969ec489 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 27 May 2019 00:36:48 -0700 Subject: [PATCH] GLES: Use fragColor0 in GLSL 3.30 float path. This should only happen when 32 bit ints are unsupported, which has been reported for a few devices. --- GPU/Common/DepalettizeShaderCommon.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GPU/Common/DepalettizeShaderCommon.cpp b/GPU/Common/DepalettizeShaderCommon.cpp index 09615ed8b8..a5e9bc0e5e 100644 --- a/GPU/Common/DepalettizeShaderCommon.cpp +++ b/GPU/Common/DepalettizeShaderCommon.cpp @@ -253,6 +253,10 @@ void GenerateDepalShaderFloat(char *buffer, GEBufferFormat pixelFormat, ShaderLa WRITE(p, "precision mediump float;\n"); } else { WRITE(p, "#version %d\n", gl_extensions.GLSLVersion()); + if (gl_extensions.VersionGEThan(3, 3)) { + WRITE(p, "#define gl_FragColor fragColor0\n"); + WRITE(p, "out vec4 fragColor0;\n"); + } } WRITE(p, "varying vec2 v_texcoord0;\n"); WRITE(p, "uniform sampler2D tex;\n");