Applied fixes from sdfBuildDistanceFieldNoAlloc() to sdfCoverageToDistanceField()