mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-28 17:58:42 +00:00
blade: Fix display of straight underlines (#11818)
Fixes: #11715 (also apply alpha of the color to wavy ones while we're at it) Release Notes: - Fixed display of straight underlines when using the blade renderer (#11715)
This commit is contained in:
parent
edadc6f938
commit
ba26acc1ed
1 changed files with 2 additions and 2 deletions
|
@ -483,7 +483,7 @@ fn fs_underline(input: UnderlineVarying) -> @location(0) vec4<f32> {
|
|||
let underline = b_underlines[input.underline_id];
|
||||
if ((underline.wavy & 0xFFu) == 0u)
|
||||
{
|
||||
return vec4<f32>(0.0);
|
||||
return blend_color(input.color, input.color.a);
|
||||
}
|
||||
|
||||
let half_thickness = underline.thickness * 0.5;
|
||||
|
@ -497,7 +497,7 @@ fn fs_underline(input: UnderlineVarying) -> @location(0) vec4<f32> {
|
|||
let distance_from_top_border = distance_in_pixels - half_thickness;
|
||||
let distance_from_bottom_border = distance_in_pixels + half_thickness;
|
||||
let alpha = saturate(0.5 - max(-distance_from_bottom_border, distance_from_top_border));
|
||||
return blend_color(input.color, alpha);
|
||||
return blend_color(input.color, alpha * input.color.a);
|
||||
}
|
||||
|
||||
// --- monochrome sprites --- //
|
||||
|
|
Loading…
Reference in a new issue