Chlumsky / msdfgen

Multi-channel signed distance field generator
MIT License
3.9k stars 404 forks source link

What is the principle of error correction? #165

Closed FaithALL closed 1 year ago

FaithALL commented 1 year ago

MSDF is awesome. I have read your code and I don't understand the latest error correction. Before this, I have read about https://github.com/Chlumsky/msdfgen/issues/74 and https://github.com/Chlumsky/msdfgen/issues/106. It seems to me that this is a problem caused by irrelevant pixel interpolation. (+,+,-) and (-,+,+) interpolate out (-,+,-), which leads to the wrong sign of the pseudo-distance. Your original solution was to detect this and change (+,+,-) or (-,+,+) to (mid, mid, mid).The latest error correction looks overly complicated for me to understand.