Ol3 RasterLayer inspiration for rgb/terrain manipolation

Tim presented the following on ol3 boards.

Here’s the initial ol.source.Raster implementation:
https://github.com/openlayers/ol3/pull/3214
I didn’t take a ton of time with an example yet, but here’s a single
imagery source and two simple operations producing an output raster
source:
http://tschaub.net/ol-raster/examples/raster.html

function tgi(pixels) {
var pixel = pixels[0];
var r = pixel[0] / 255;
var g = pixel[1] / 255;
var b = pixel[2] / 255;
var value = (120 * (r - b) - (190 * (r - g))) / 2;
pixel[0] = value; return pixels;
}

This simplicity for doing pixel manipolation in drivers, opens the door for actually creating something where average users can design their own small algorihtms (NDVI and NIR).

I think this is something the cesium team should see also, since it would be really awesome if I could use a tile source and create a small function like above that returns rgb and height, would allow me to create cool visualizations really quickly.

There are some nice things in this idea atleast.