aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-11-29 11:12:29 +0000
committervaxerski <[email protected]>2022-11-29 11:12:29 +0000
commit212f599412904a4f39741084f63a2fd1224b97ba (patch)
tree2f5a148f3e3c8caba3af2c74a1e915c3a600785e
parent55776df685340ae798aace1c74381d3f6d350313 (diff)
downloadHyprland-212f599412904a4f39741084f63a2fd1224b97ba.tar.gz
Hyprland-212f599412904a4f39741084f63a2fd1224b97ba.zip
fix AA on borders
-rw-r--r--src/render/shaders/Border.hpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/render/shaders/Border.hpp b/src/render/shaders/Border.hpp
index ab3c7d5b..3b630942 100644
--- a/src/render/shaders/Border.hpp
+++ b/src/render/shaders/Border.hpp
@@ -86,7 +86,7 @@ void main() {
distances /= 4.0;
- pixColor = pixColor * distances;
+ pixColor[3] *= distances;
} else if (dist > radius || dist < radius - thick)
discard;
@@ -111,8 +111,9 @@ void main() {
if (pixColor[3] == 0.0)
discard;
- pixColor = getColorForCoord(v_texcoord) * pixColor[3];
- pixColor[3] *= alpha;
+ float pixColor3 = pixColor[3];
+ pixColor = getColorForCoord(v_texcoord);
+ pixColor[3] *= alpha * pixColor3;
gl_FragColor = pixColor;
}