diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2022-02-10 15:29:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-10 15:29:03 +0300 |
commit | c35ccaf9b542cc90d3a37f123fe6cb429ad9157c (patch) | |
tree | 86a8dd6b1b2c3c726be82923f25a4fd6fddd7e7e | |
parent | eefce4e9af9bf64aeb2c63bb7171377e47c8c98a (diff) | |
download | r-alacritty-c35ccaf9b542cc90d3a37f123fe6cb429ad9157c.tar.gz r-alacritty-c35ccaf9b542cc90d3a37f123fe6cb429ad9157c.tar.bz2 r-alacritty-c35ccaf9b542cc90d3a37f123fe6cb429ad9157c.zip |
Make undercurls thickness close to underlines
Fixes #5873.
-rw-r--r-- | alacritty/res/rect.f.glsl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/alacritty/res/rect.f.glsl b/alacritty/res/rect.f.glsl index 00c2de83..ab1d9dcd 100644 --- a/alacritty/res/rect.f.glsl +++ b/alacritty/res/rect.f.glsl @@ -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 |