From 2e44c02bbc2108fde3be69f11aea6b65d63ba999 Mon Sep 17 00:00:00 2001 From: Ravie <65019210+HiRavie@users.noreply.github.com> Date: Mon, 8 Jan 2024 21:52:14 +0100 Subject: [PATCH] Improve text outlines --- src/engine/client/text.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/client/text.cpp b/src/engine/client/text.cpp index 155e69677..833786d3c 100644 --- a/src/engine/client/text.cpp +++ b/src/engine/client/text.cpp @@ -465,8 +465,8 @@ private: if(GetX >= 0 && GetY >= 0 && GetX < w && GetY < h) { int Index = GetY * w + GetX; - if(pIn[Index] > c) - c = pIn[Index]; + float Mask = 1.f - clamp(length(vec2(sx, sy)) - OutlineCount, 0.f, 1.f); + c = maximum(c, int(pIn[Index] * Mask)); } } }