Skip to content

Commit

Permalink
Fixed a minor bug in edge artifact patcher
Browse files Browse the repository at this point in the history
  • Loading branch information
Chlumsky committed Mar 28, 2021
1 parent 5d756c0 commit 8332618
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/msdf-edge-artifact-patcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8332618

Please sign in to comment.