diff --git a/bevy_kayak_renderer/src/render/unified/shader.wgsl b/bevy_kayak_renderer/src/render/unified/shader.wgsl index b43867e2662cb4a946bb4e94ddddbde284304843..a08eb3895f1847e9b63c2874f394c87fe4ed7ee3 100644 --- a/bevy_kayak_renderer/src/render/unified/shader.wgsl +++ b/bevy_kayak_renderer/src/render/unified/shader.wgsl @@ -71,7 +71,7 @@ fn fragment(in: VertexOutput) -> [[location(0)]] vec4<f32> { bs, ); rect_dist = 1.0 - smoothStep(0.0, fwidth(rect_dist), rect_dist); - return vec4<f32>(in.color.rgb, rect_dist); + return vec4<f32>(in.color.rgb, rect_dist * in.color.a); } if (quad_type.t == 1) { var px_range = 3.5; @@ -95,4 +95,4 @@ fn fragment(in: VertexOutput) -> [[location(0)]] vec4<f32> { return vec4<f32>(color.rgb * in.color.rgb, color.a * in.color.a * mask); } return in.color; -} \ No newline at end of file +}