Pixel sorting is the undisputed king of modern glitch art. It creates the illusion that the digital data of your image is physically melting, cascading down the screen in structured, colorful waterfalls.
The algorithm doesn’t just blur your photo—it literally rips the pixels out of the image, sorts them mathematically based on your chosen criteria (like how bright or colorful they are), and places them back.
Mastering the melt
The difference between a broken image and a beautiful piece of glitch art is how you define the “mask”—the areas of the image that are allowed to melt.
- Luminance Threshold: This is your primary control. If you set it to 200, only the absolute brightest highlights in your photo will melt. If you set it to 50, almost the entire photo will melt. Finding the sweet spot where the subject stays intact while the background or highlights drip away is key.
- Invert Mask: By default, bright pixels melt. Check this box to make the dark shadows melt instead.
- Edge Randomness: This uses 1D procedural noise to stagger the threshold slightly on every single column. This prevents the “barcode” effect and gives the drips organic, ragged edges.
Sorting metrics
Once a chunk of pixels is selected to melt, how should they be arranged?
- Luminance: Sorts the pixels from darkest to brightest. This is the classic ASDF pixel sort look.
- Hue: Sorts the pixels by their raw color (red to green to blue). This looks incredible on neon or cyberpunk photos.
- Saturation: Sorts the pixels by how vivid they are, creating streaks that fade into gray.