**************************************************************************
*             Adaptive Caustic Maps Using Deferred Shading               *
*   (Computer Graphics Forum 28(2) & Proceedings of Eurographics 2009)   *
*                     Chris Wyman and Greg Nichols                       *
*                          University of Iowa                            *
*    More Information: http://www.cs.uiowa.edu/~cwyman/publications/     *
**************************************************************************

This directory contains GLSL shaders for our demo for the paper above.

There are six directories here:
   adaptiveCausticMaps/      -> Contains caustic shaders for this paper
   basicRefraction/          -> Refraction shaders (incl. deferred refraction)
   hierarchicalCausticMaps/  -> Shaders for the "Hierarchical Caustic Maps" I3D paper
   normalSurfaceShaders/     -> Shaders for standard scene surfaces (boring!)
   simpleCausticMaps/        -> Shaders for simple image-space caustics
   utilityShaders/           -> Utilities (copy FBO, merge tex array, store frag position)

The two directories that contain shaders most relevant to this paper are
"adaptiveCausticMaps/", which contains all the adaptive traversal and 
splatting code, and "basicRefraction/", which contains our implementation 
of deferred refraction.  Shaders in these directories have the most
in-code documentation.

However, "hierarchicalCausticMaps/" may also be of interest since we have
not previously released code snippets or a demo for our hierarchical caustic
map implementation.  Please note that few parameters of this implementation
are tweakable via UI controls in this demo, and the code is not commented
to the same standard.

Also "simpleCausticMaps/" contains a significantly improved implementation
of our original image-space caustic mapping technique, though we have not
commented the code particularly well.

"normalSurfaceShaders/" contains boring code to render diffuse and Phong
shaders.  The only (possibly) interesting code is how we index into the
caustic maps.  Since this is essentially no more than a shadow map-like
texture lookup, this is not well commented either.  See the fragment shaders
and the function CausticContribution() for details (and compare to the
function IsPointIlluminated(), which uses the shadow map to identify 
illuminated points).

Shaders in the "utilityShaders/" directory should be self explanatory 
based upon their names or the comments in the code.  Most shaders are 2-4 
lines and should need little explanation.

