Simple OpenGL question: Can the refractions/caustics be computed entirely in the shaders? Or do you have to do some of the processing in the CPU* and pass the results back to the shaders? All the shaders I've seen are "local," in the sense that they only have access to the interpolated vertex data for their polygon, plus whatever uniforms have been set. It seems to me that things like caustics would require non-local information. Is that non-local information passed via a uniform? If so, I wonder what the data format of that uniform is.
* I know that shaders aren't guaranteed to execute on the GPU, depending on the OpenGL implementation. But for simplicity let's just assume they do.