From fcfc78db642e6d8fb6f51a3c5992a81c3ad4a6d3 Mon Sep 17 00:00:00 2001 From: Marios Staikopoulos Date: Tue, 14 Jul 2020 09:35:14 -0700 Subject: [PATCH] Max out alpha when Alpha Hash/Alpha Scissor is used without Alpha Edge --- servers/rendering/rasterizer_rd/shaders/scene_high_end.glsl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/servers/rendering/rasterizer_rd/shaders/scene_high_end.glsl b/servers/rendering/rasterizer_rd/shaders/scene_high_end.glsl index 2614142ae384..3f31ef1408a0 100644 --- a/servers/rendering/rasterizer_rd/shaders/scene_high_end.glsl +++ b/servers/rendering/rasterizer_rd/shaders/scene_high_end.glsl @@ -1774,6 +1774,11 @@ FRAGMENT_SHADER_CODE } #endif // ALPHA_HASH_USED +// If we are not edge antialiasing, we need to remove the output alpha channel from scissor and hash +#if (defined(ALPHA_SCISSOR_USED) || defined(ALPHA_HASH_USED)) && !defined(ALPHA_ANTIALIASING_EDGE_USED) + alpha = 1.0; +#endif + #ifdef ALPHA_ANTIALIASING_EDGE_USED // If alpha scissor is used, we must further the edge threshold, otherwise we wont get any edge feather #ifdef ALPHA_SCISSOR_USED