From 83326187ddab7c0ceb4994e121a8ba0bf18dc52f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Chlumsk=C3=BD?= Date: Sun, 28 Mar 2021 17:19:30 +0200 Subject: [PATCH] Fixed a minor bug in edge artifact patcher --- core/msdf-edge-artifact-patcher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/msdf-edge-artifact-patcher.cpp b/core/msdf-edge-artifact-patcher.cpp index 14c55df..2b5cdd0 100644 --- a/core/msdf-edge-artifact-patcher.cpp +++ b/core/msdf-edge-artifact-patcher.cpp @@ -42,13 +42,13 @@ static int findDiagonalChannelHotspots(double t[2], const float *a, const float for (int i = 0; i < solutions; ++i) if (x[i] > 0 && x[i] < 1) { float am = median(a[0], a[1], a[2]); - float bm = median(b[0], b[1], b[2]); + float dm = median(d[0], d[1], d[2]); float xm = median( mix(mix(a[0], b[0], x[i]), mix(c[0], d[0], x[i]), x[i]), mix(mix(a[1], b[1], x[i]), mix(c[1], d[1], x[i]), x[i]), mix(mix(a[2], b[2], x[i]), mix(c[2], d[2], x[i]), x[i]) ); - if (isHotspot(am, bm, xm)) + if (isHotspot(am, dm, xm)) t[found++] = x[i]; } return found;