From ff4ea1a13a297b55d88bffa25a3f3dec17234c40 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Tue, 29 Nov 2022 21:11:37 +0000 Subject: [PATCH] fix border inner offset in shader --- src/render/shaders/Border.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/render/shaders/Border.hpp b/src/render/shaders/Border.hpp index 3b630942..e89251a8 100644 --- a/src/render/shaders/Border.hpp +++ b/src/render/shaders/Border.hpp @@ -73,13 +73,13 @@ void main() { if (primitiveMultisample == 1 && (dist > radius - 1.0 || dist < radius - thick + 1.0)) { float distances = 0.0; float len = length(pixCoord + vec2(0.25, 0.25)); - distances += float(len < radius + 0.5 && len > radius - thick); + distances += float(len < radius && len > radius - thick); len = length(pixCoord + vec2(0.75, 0.25)); - distances += float(len < radius + 0.5 && len > radius - thick); + distances += float(len < radius && len > radius - thick); len = length(pixCoord + vec2(0.25, 0.75)); - distances += float(len < radius + 0.5 && len > radius - thick); + distances += float(len < radius && len > radius - thick); len = length(pixCoord + vec2(0.75, 0.75)); - distances += float(len < radius + 0.5 && len > radius - thick); + distances += float(len < radius && len > radius - thick); if (distances == 0.0) discard;