From 101ebe3ac38457b71a7b21c4f8ca2b7c1d9e797a Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 24 Mar 2024 20:48:04 +1000 Subject: [PATCH] PostProcessing/FX: Fix GLSL compile error with discard --- src/util/postprocessing_shader_fx.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/postprocessing_shader_fx.cpp b/src/util/postprocessing_shader_fx.cpp index 9d5b6f81b..9569a1ae0 100644 --- a/src/util/postprocessing_shader_fx.cpp +++ b/src/util/postprocessing_shader_fx.cpp @@ -1170,7 +1170,8 @@ bool PostProcessing::ReShadeFXShader::CompilePipeline(GPUTexture::Format format, if (needs_main_defn) { // dFdx/dFdy are not defined in the vertex shader. - const char* defns = (stage == GPUShaderStage::Vertex) ? "#define dFdx(x) x\n#define dFdy(x) x\n" : ""; + const char* defns = + (stage == GPUShaderStage::Vertex) ? "#define dFdx(x) x\n#define dFdy(x) x\n#define discard\n" : ""; const char* precision = (api == RenderAPI::OpenGLES) ? "precision highp float;\nprecision highp int;\nprecision highp sampler2D;\n" : "";