This fixes most issues with the dilation algorithm for UV seams.
Two aspects are addressed in this patch:
- Correct computation of dilation distance, so that dilated boundaries remain parallel to the original boundaries (and with the actual distance specified as bleed distance).
- Dilate with regard to adjacent seams instead of adjacent triangle edges, for a more correct result. This is especially important in the case of concave shapes, where spikes could overlap with actual geometry.
This is a comparison between the existing implementation and the new one:
Note that the pattern being extended at the seams instead of stretched is not caused by this patch, but rather D4345.
One issue that remains is that sharp corners can extend excessively. This is addressed by D4437, though that fix adds yet some more overhead. Here the corner spikes are limited to five times the bleed distance, though this is far from an ideal solution.
