aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2022-02-10 15:29:03 +0300
committerGitHub <noreply@github.com>2022-02-10 15:29:03 +0300
commitc35ccaf9b542cc90d3a37f123fe6cb429ad9157c (patch)
tree86a8dd6b1b2c3c726be82923f25a4fd6fddd7e7e
parenteefce4e9af9bf64aeb2c63bb7171377e47c8c98a (diff)
downloadr-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.glsl5
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