Hi awesome Cesium developers,
I've been using SingleTileImageryProvider to overlay a PNG raster image on top of Cesium base layers, adjust transparency, etc. Very happy with this.
I'd like to add customized image processing filters: I was very impressed to see hue, saturation, brightness, etc., already supported out of the box, but I'd like to do per-pixel custom image processing, in the vein of this tutorial from HTML5Rocks [1]:
[1] http://www.html5rocks.com/en/tutorials/canvas/imagefilters/
I see that SingleTileImageryProvider's (and all the imagery provider classes that use it) requestImage function can yield a canvas or an "image" [2]. I.e., in SingleTileImageryProvider, requestImage gives the "_image" member while in TileCoordinatesImageryProvider, this function returns a 256x256 canvas [3].
[2] https://cesiumjs.org/Cesium/Build/Documentation/SingleTileImageryProvider.html#requestImage
[3] https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/TileCoordinatesImageryProvider.js#L233
I'm trying to understand what are my choices in inserting custom image processing steps between the imagery provider's original rasters, through a potential canvas that Cesium might be using under the hood, to final display in WebGL. In [4], Scott Hunter proposed a custom imagery provider class that produced custom canvases in its requestImage.
[4] https://groups.google.com/d/msg/cesium-dev/rh48mTIcBe8/I5YMpxyLseEJ
More recently, Kevin Ring in [5] suggests this is could be done as easily as a JS object literal, in a thread that started out discussing the fact that SingleTileImageryProvider could only be constructed with a URL, and not a canvas object.
[5] https://groups.google.com/d/msg/cesium-dev/EBY4pypCRH8/yYzcriiHCAAJ
Instead of diving into creating a custom imagery provider, I noticed that, in an undated set of slides [6], slide 15 ("page" 17), Patrick Cozzi gives "image filters" as an example of contributions from users, which makes me ask if there's something easier I could be looking at to achieve my goal of custom image processing.
[6] https://cesiumjs.org/presentations/Cesium3DMapsOnTheWeb.pdf
Any tips would be most appreciated, thank you!
Ahmed