New Order

A GPU accelerated sorting algorithm arranges every line of an image by increasing luminosity. The image retains every pixel, but appears in new order.

It’s fascinating to discover how many artworks - by old masters or by more modern artists - use similar patterns in how visual weight balances on the canvas.

Using a bitonic merge sort network implemented in the fragment shader, this piece is fast enough to process images and videos in real-time; it also sorts live videos fed from the built-in camera. To show the sorting algorithm in vivo, the first sorts run about 50 times slower than realtime.