Skip to content
Snippets Groups Projects
Commit c66d437f authored by Matthew's avatar Matthew
Browse files

Fix transparency for type 0 quads

parent 0572f601
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment