From 0918731d9ab7faa2ae5b035e59a829f86dcc35b6 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 16 Oct 2023 12:22:51 -0700 Subject: [PATCH] renderer/metal: need to set proper alpha for fg mode in shader Fixes #673 --- src/renderer/shaders/cell.metal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/shaders/cell.metal b/src/renderer/shaders/cell.metal index bfc68aaa4..19d89f1d0 100644 --- a/src/renderer/shaders/cell.metal +++ b/src/renderer/shaders/cell.metal @@ -166,7 +166,7 @@ fragment float4 uber_fragment( // We premult the alpha to our whole color since our blend function // uses One/OneMinusSourceAlpha to avoid blurry edges. // We first premult our given color. - float4 premult = float4(in.color.rgb * in.color.a, 1); + float4 premult = float4(in.color.rgb * in.color.a, in.color.a); // Then premult the texture color float a = textureGreyscale.sample(textureSampler, coord).r; premult = premult * a;