From e0998be181c84e64f2665d0662265d0a8e7aa740 Mon Sep 17 00:00:00 2001 From: grovesNL Date: Wed, 25 Jan 2023 15:45:54 -0330 Subject: [PATCH] Only multiply alpha --- src/shader.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shader.wgsl b/src/shader.wgsl index 090d155..e69763b 100644 --- a/src/shader.wgsl +++ b/src/shader.wgsl @@ -102,7 +102,7 @@ fn fs_main(in_frag: VertexOutput) -> @location(0) vec4 { return textureSampleLevel(color_atlas_texture, atlas_sampler, in_frag.uv, 0.0); } case 1u: { - return in_frag.color * textureSampleLevel(mask_atlas_texture, atlas_sampler, in_frag.uv, 0.0); + return vec4(in_frag.color.rgb, in_frag.color.a * textureSampleLevel(mask_atlas_texture, atlas_sampler, in_frag.uv, 0.0).x); } default: { return vec4(0.0);