I was inspired by Facebook's celebratepride converter, and decided to make my own version in GLSL.
##Usage
Compile the vertex and fragment shaders into a program, then apply that program to a quad that takes up the whole screen. The screen should be square.
##Uniforms
The vertex shader does not take any uniforms.
screenWidth
— The width of the GL screen, in pixels.screenHeight
— The height of the GL screen, in pixels.noise
— A texture of pure white noise, used for randomness. GIMP can create such an image for you: Go to Filters > Noise > Hurl..., then set the Randomness % to 100%.target
— A texture you want to mask over the tiles. The value channel of the tiles is masked onto the value channel of the target texture, while the hue and saturation channels are always taken from the tiles.
Remember that both textures should have a power of 2 width and height. I recommend the same dimensions as your screen.
##WebGL
Shaders marked #version 100
are WebGL compatible, so you can use these with in a website using WebGL if you so desire. (Heck, that's how I put my avatar into it.)