Refractor is a multitouch interface for transforming and distorting images.
Refractor is based on web standards, so it should just run in Safari on iPad. But Apple unfortunately doesn't (yet) allow WebGL to run on iOS. Unless it's in an iAd!
Fortunately it's not too difficult to run Refractor as an iAd.
GLSL code is dynamically generated by the sequence of distortions you chain together.
The distortions themselves are just primitive GLSL functions:
Each distortion is sandwiched by an affine transformation first, and then its inverse transformation afterwards. In effect, this sandwiching lets us change the reference frame for the distortion.
The transformations are modeled as 3x3 matrices and sent in to the shader as uniforms. The matrices are manipulated by multi-touching the image.
By Toby Schachman for the Pixel Shaders project.
The first prototype was created during Art Hack Day NYC 2013: God Mode at 319 Scholes.
Pixel Shaders is supported by an Open(Art) Fellowship from Eyebeam and Mozilla.