Pixel Sorting Effect - Shader Nodes
To use the nodegroups in your own project you can append the nodegroups or the material.
Every Pixel Sorting nodegroup has a color mixer group to correctly mix the colors on top of the texture. Put the texture you want to use in between of those two corresponding groups just like in the example file provided.
You can also use procedural textures!
Now it's just a matter of tweaking the values or animating them.
If you have any further questions or problems, don't hesitate to contact me! ;)
Have fun!