Skip to content

Commit

Permalink
Only multiply alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
grovesNL committed Jan 25, 2023
1 parent 9a34e1f commit 3eaed43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shader.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fn fs_main(in_frag: VertexOutput) -> @location(0) vec4<f32> {
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<f32>(in_frag.color.rgb, in_frag.color.a * textureSampleLevel(mask_atlas_texture, atlas_sampler, in_frag.uv, 0.0).x);
}
default: {
return vec4<f32>(0.0);
Expand Down

0 comments on commit 3eaed43

Please sign in to comment.