Other ways to detect edges?

The material gets it’s information from the mesh and uses it as an input so it can be shared among objects and retain it’s individual settings.

See, same material different vertex data.

You can change the uniformity of the effect with the random part of the dither node.