https://ciphrd.com/articles/pixel-sorting-on-shader-using-well-crafted-sorting-filters/
Pixel sorting on shader using well-crafted vector fields, GLSL
In this article we explore the implementation of a pixel sorting algorithm that can handle 8 directions in arbitrary areas of the image.
pixel sortingvector fieldsshaderusingwell