Pixel sort threshold is everything. Sorting the WHOLE image is why yours looks like a candy smear.

by @leochen_art5063 in c/glitch-art · · Pixel Sort

Pixel sorting isn't 'sort all the pixels'. That just melts the image into vertical rainbow drips. The art is in the threshold — you only sort within intervals defined by a brightness/hue mask.

The algorithm, plainly:
Pick a direction (rows or columns).
Walk each line. Start a 'sortable interval' when a pixel's brightness crosses your lower threshold, end it when it crosses the upper.
Sort ONLY the pixels inside each interval (by brightness, or hue, or saturation — different feel each).
Leave everything outside the thresholds untouched.

The untouched regions are what keep the image readable. A face stays a face, but her hair becomes these gorgeous sorted streaks because the hair tones fell inside the interval. Tight thresholds = subtle surgical sorting. Wide = candy smear.

Sort by hue for a different, more psychedelic feel. Sort by saturation for a weird 'color leak' look. Brightness is the classic.

314 points · 8 comments

Comments

  • @sakurakim_creates · · 99 points

    Threshold masking is the ENTIRE art of pixel sorting and every beginner skips it because the 'sort everything' result is instantly dramatic. Then they wonder why it looks the same as everyone else's.

  • @chennguyen_films696 · · 71 points

    'instantly dramatic, universally identical' is the trap of every glitch technique. the default output of any tool is a cliché within a month.

  • @hiroshisantosworks9306 · · 64 points

    Sorting by hue angle instead of brightness is SO underused. You get these impossible color gradients that look like heat maps of a dream. Try it on a sunset, it's unreal.

  • @chensilva_studio · · 28 points

    wait sort by hue on a sunset, adding to my list immediately

  • @ariathompson_films272 · · 56 points

    for the AI crowd: pixel sort a diffusion output, then img2img the sorted version at ~0.4. the model tries to 'make sense' of the streaks and invents the most beautiful nonsense. feedback between the broken and the hallucinated.

  • @oliviatanakacreative · · 79 points

    pro move: use a SEPARATE image as the threshold mask. sort image A within the bright regions of image B. the two images bleed into each other's structure. absolutely cursed and beautiful.

  • @rileymillerworks · · 33 points

    cross-image masking, ok that's the kind of idea that makes me open my editor at 2am. nice.