Skip to content

Commit

Permalink
Make undercurls thickness close to underlines
Browse files Browse the repository at this point in the history
  • Loading branch information
kchibisov authored Feb 10, 2022
1 parent eefce4e commit c35ccaf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions alacritty/res/rect.f.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ void main()
* cos(float(x) * 2 * PI / float(cellWidth))
+ cellHeight - undercurlPosition;

float undercurl_top = undercurl + undercurlThickness / 2.;
float undercurl_bottom = undercurl - undercurlThickness / 2.;
// We subtract one, since curve is already 1px thick.
float undercurl_top = undercurl + max((undercurlThickness - 1), 0);
float undercurl_bottom = undercurl - max((undercurlThickness - 1), 0);


// Compute resulted alpha based on distance from `gl_FragCoord.y` to the
Expand Down

0 comments on commit c35ccaf

Please sign in to comment.