gl3 inky particles edge detection quick ?

Dante's icon

Hello. In an effort to try to understand shaders and gl3 more I am trying to understand how this patch could be translated to gl3. To keep things simple I am just trying to get an idea of where to start. My question:

How does the edge detection occur? Would it be added to the shader via texture, or through some other means like a matrix into one of the Mesh inlets.

thanks for any help

inky_particle.maxpat
Max Patch