diff options
author | vaxerski <[email protected]> | 2023-08-06 20:46:00 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2023-08-06 20:46:00 +0200 |
commit | 6e53c47e68c1d15032b755270568eb5485f2c684 (patch) | |
tree | a7e8bb2c022294a07afec27ab663eff146d15a06 | |
parent | 6c10c384813890ed137f73ee79452cbe8c6f1dca (diff) | |
download | Hyprland-6e53c47e68c1d15032b755270568eb5485f2c684.tar.gz Hyprland-6e53c47e68c1d15032b755270568eb5485f2c684.zip |
renderer: fix missing premultiplication for border multisampling
-rw-r--r-- | src/render/shaders/Border.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/render/shaders/Border.hpp b/src/render/shaders/Border.hpp index 4e5bfd97..d881dc5b 100644 --- a/src/render/shaders/Border.hpp +++ b/src/render/shaders/Border.hpp @@ -54,6 +54,7 @@ void main() { highp vec2 pixCoord = vec2(gl_FragCoord); highp vec2 originalPixCoord = v_texcoord; originalPixCoord *= fullSizeUntransformed; + float additionalAlpha = 1.0; vec4 pixColor = vec4(1.0, 1.0, 1.0, 1.0); @@ -86,7 +87,7 @@ void main() { distances /= 4.0; - pixColor[3] *= distances; + additionalAlpha *= distances; } else if (dist > radius || dist < radius - thick) discard; @@ -113,6 +114,6 @@ void main() { pixColor = getColorForCoord(v_texcoord); - gl_FragColor = pixColor * alpha; + gl_FragColor = pixColor * alpha * additionalAlpha; } )#"; |