Skip to content

Commit bd90a64

Browse files
authored
UI: don't multiply color channels by alpha (#12599)
# Objective - since #12500, text is a little bit more gray in UI ## Solution - don't multiply color by alpha. I think this was done in the original PR (#8973) for shadows which were not added in #12500
1 parent ed44eb3 commit bd90a64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/bevy_ui/src/render/ui.wgsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,12 @@ fn draw(in: VertexOutput) -> vec4<f32> {
300300
// is present, otherwise an outline about the external boundary would be drawn even without
301301
// a border.
302302
let t = 1. - select(step(0.0, border_distance), smoothstep(0.0, fborder, border_distance), external_distance < internal_distance);
303-
return vec4(color.rgb * t * color.a, t * color.a);
303+
return color.rgba * t;
304304
}
305305

306306
// The item is a rectangle, draw normally with anti-aliasing at the edges.
307307
let t = 1. - smoothstep(0.0, fexternal, external_distance);
308-
return vec4(color.rgb * t * color.a, t * color.a);
308+
return color.rgba * t;
309309
}
310310

311311
@fragment

0 commit comments

Comments
 (0)