From 97e0db205dcf4508935d6b5c2504f8de0ac59292 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 31 Mar 2021 16:24:28 +0200 Subject: [PATCH] Don't blend alpha channels We want to use the source alpha to determine the color of the final pixel, but we want the final pixels to be fully opaque. Co-Authored-By: Nathan Sobo --- gpui/src/platform/mac/renderer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpui/src/platform/mac/renderer.rs b/gpui/src/platform/mac/renderer.rs index 11ca3915fb..56259cc9b5 100644 --- a/gpui/src/platform/mac/renderer.rs +++ b/gpui/src/platform/mac/renderer.rs @@ -709,9 +709,9 @@ fn build_pipeline_state( color_attachment.set_rgb_blend_operation(metal::MTLBlendOperation::Add); color_attachment.set_alpha_blend_operation(metal::MTLBlendOperation::Add); color_attachment.set_source_rgb_blend_factor(metal::MTLBlendFactor::SourceAlpha); - color_attachment.set_source_alpha_blend_factor(metal::MTLBlendFactor::SourceAlpha); + color_attachment.set_source_alpha_blend_factor(metal::MTLBlendFactor::One); color_attachment.set_destination_rgb_blend_factor(metal::MTLBlendFactor::OneMinusSourceAlpha); - color_attachment.set_destination_alpha_blend_factor(metal::MTLBlendFactor::OneMinusSourceAlpha); + color_attachment.set_destination_alpha_blend_factor(metal::MTLBlendFactor::One); device .new_render_pipeline_state(&descriptor)