Make undercurls thickness close to underlines

Fixes #5873.
This commit is contained in:
Kirill Chibisov 2022-02-10 15:29:03 +03:00 committed by GitHub
parent eefce4e9af
commit c35ccaf9b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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