Dilate/Erode: Difference between Step and Distance mode?
In Step and Distance mode, the Erode/Dilate node samples through all pixels and compares their value to the neighbouring pixels. If a neighbouring pixel has a lesser value, than it is matched the sample pixels value.

The following pseudo python shall demonstrate.

FOREACH a OF allPixels:
    FOREACH b NEXT TO a:
        IF (a &gt; b):
            b = a


In Step mode, the adjacent pixels are right, top, left, bottom.



In Distance mode, the adjacent pixels include diagonal connections.



Here is a comparison of an example.