default = auto = auto-mixed = mixed
auto-fast = fast
auto-full = full
distance = distance-fast = indiscriminate = indiscriminate-fast
distance-full = indiscriminate-full
edge-full = edge
(horizontal, vertical, or diagonal pairs)
find position where specified channel of those texels, crosses 0if it is between the 2 texels:interpolate the texels at that positionchannel contributes to edge iff median of interpolated value is in specified channel of interpolated value mark the sample as protecteddistance check mode is do-not-check-distance
or
distance check mode is check-distance-at-edge and correction mode is edge-only
mark all samples as ‘protected’
(check all 8 adjacent samples that are in bounds for sdf)
(RG,GB,RB)
ignoring cases where that point is eactly at a sample (or within some epsilon)
for base artifact checker:eithermedian interpolated at that point has different sign from sample mediansor sample being tested isn’t protected and is not between sample mediansand interpolated median is not a plausible distance from sample medians (a distance field sampled every N units can at most change by N between adjacent samples. So for a point between two samples,if it is T units from first sample, the interpolated distance at that point must be within T of first sample and N-T from 2nd)(not exact, allow within N% of exact distance)
for distance checker w/ contour combiner:run base checker, and if it got to 3rd test and distance was plausible:calculate exact distance to shape at that pointcalculate interpolated distance from msdfcalculate interpolated distance if sample were flattenedmark sample if new distance is closer to exact distancebilinear interpolation, so need to solve quadratic to find point (and possibly 2 points
also check for a local extreme of each channel of the pair being tested along the diagonal, and run artifact check routine with the interpolated value at that extreme instead of one of corresponding sample
(ex. if samples are at 0 and 1, test point is at 0.5, channel maximum is 0.7, check with 0 and 0.7 instead of 0 and 1)