renderer/metal: need to set proper alpha for fg mode in shader

Fixes #673
This commit is contained in:
Mitchell Hashimoto
2023-10-16 12:22:51 -07:00
parent 7ce313d1db
commit 0918731d9a

View File

@ -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;