correction, discard only if owner != myIndex AND mergedSdf > smoothFactor

This commit is contained in:
Robin Seger 2026-03-25 22:33:13 +01:00
parent 7d01180f5c
commit 51a12193c3

View file

@ -203,7 +203,7 @@ void main() {
}
mergedSdf = sminNoBulge(mergedSdf, d, smoothFactor);
if (d < smoothFactor && d < minDist) {
if (d < minDist) {
minDist = d;
owner = i;
}
@ -277,10 +277,11 @@ void main() {
}
}
// Each renderer only outputs pixels it owns
// Each renderer only outputs pixels it owns, but allow rendering
// blend zones to prevent gaps (mergedSdf < smoothFactor means in blend)
// myIndex == -1: inverted rect renders border-owned pixels
// myIndex >= 0: individual rect renders its owned pixels
if (owner != myIndex)
if (owner != myIndex && mergedSdf > smoothFactor)
discard;
float fw = fwidth(mergedSdf);