I've been working on adding a water mesh plugin to CS for the past month, and I haven't really been letting the community keep up with my progress. So, I'd like to tell you all what I've done so far!
First, I started to build off of the protomesh plugin that's already in CS. This gave me a great framework for having a general factory with all of the necessary information: vertex locations, color, normals, etc. The great thing about the protomesh is that it doesn't have too much clutter in the code so it was relatively simple to figure out how everything worked with SCF and implementation details. Hence, it was fairly easy to get *some* sort of mesh going, and the next step would be to add water-like attributes to it.
This is where things started getting tricky since this is my first time doing a water effect and I had to do a lot of reading regarding reflection, refraction, Fresnel values, wave generation, fluid dynamics, etc. Finally, after I settled on this paper, I started learning about the shader system in CS.
In my Graphics course here at the University of Chicago, the term "shader" was used to mean the vertex and fragment programs that are loaded for the specific rendering step. Unfortunately this created a bit of confusion when reading the documentation for shaders in CS, so it wasn't immediately obvious how everything worked. It wasn't too long, however, until I finally realized how to define shader variables, add shader programs, and generally define a mechanism for rendering a simple water mesh.
So, with the help of sueastside, I got some ideas (and normal maps) to create a preliminary water effect. Unfortunately, after reading a few different methods for looking up or approximating the Fresnel value, it isn't terribly clear what the best way to go about implementing it in CS is. I have a few ideas that involve tactics from the aforementioned paper, but I want to have a working version of everything before I start making it all better.
So, I present to you what I have so far in the form of screen shots (or you can go check out my SVN branch). These are using the same hard coded directional light with different normal maps. =)