This is an ongoing project of mine with an aim to create a realistic water and underwater shader. Keep in mind this is a work in progress and serves just for demo purposes, I no not really recommend using this as a resource for your own projects. But I do intend in to expand this to become an artist friendly toolkit for those who want to have realistic water scenes in their projects.
video of the shader in action:
If you have any suggestions, comments, or technical issues running the blend, drop me a message in this thread in BlenderArtists forums:
The water shader is based on my own observations of water characteristics.
reflection with accurate fresnel refectance model
refraction with chromatic aberration
projected caustics on geometry from the water surface based on normals
seamless transition to underwater (no fake fog added)
accurate water volume with light scattering
view and light ray color extinction based on water color and sunlight
simple coastline detection based on terrain`s height-map
does not yet feature:
displaced water geometry
underwater light rays from caustics
Sky model is based on Preetham, but implementation is from Simon Wallner, with a significant (artistic) changes done by myself.
I have also included an overly exaggerated experimental glitter shader and a completely procedural "water droplets on lens" shader.