diff --git a/src/rendering/hwrenderer/postprocessing/hw_postprocess.cpp b/src/rendering/hwrenderer/postprocessing/hw_postprocess.cpp index 9eb64a1d01..20244c9018 100644 --- a/src/rendering/hwrenderer/postprocessing/hw_postprocess.cpp +++ b/src/rendering/hwrenderer/postprocessing/hw_postprocess.cpp @@ -389,6 +389,7 @@ FString PPFXAA::GetDefines() } const int gatherAlpha = GetMaxVersion() >= 400 ? 1 : 0; + const int discard = screen->IsVulkan() ? 0 : 1; // TODO: enable FXAA_GATHER4_ALPHA on OpenGL earlier than 4.0 // when GL_ARB_gpu_shader5/GL_NV_gpu_shader5 extensions are supported @@ -396,8 +397,9 @@ FString PPFXAA::GetDefines() FString result; result.Format( "#define FXAA_QUALITY__PRESET %i\n" - "#define FXAA_GATHER4_ALPHA %i\n", - quality, gatherAlpha); + "#define FXAA_GATHER4_ALPHA %i\n" + "#define FXAA_DISCARD %i\n", + quality, gatherAlpha, discard); return result; } diff --git a/wadsrc/static/shaders/glsl/fxaa.fp b/wadsrc/static/shaders/glsl/fxaa.fp index ab1d1ad478..220095ae10 100644 --- a/wadsrc/static/shaders/glsl/fxaa.fp +++ b/wadsrc/static/shaders/glsl/fxaa.fp @@ -52,8 +52,6 @@ void main() // NVIDIA FXAA 3.11 by TIMOTHY LOTTES //============================================================================ -#define FXAA_DISCARD 1 - #define FXAA_GREEN_AS_LUMA 0 #define FxaaBool bool