   simulating water( basic question)
  Hi I'm really confused why I can't find a good article about simulating the water ( with refraction and reflection ) using GLSL?I have read an article about it here:Realistic Water Using Bump Mapping and Refraction  But the source code is not available and I don't want to buy a full CD to just see one source code!Are there any examples to use this method to simulate water?ThanksEhsan[Edited by - ehsan2004 on April 23, 2010 10:30:56 AM]
  Here's a nice looking article:Chapter 1. Effective Water Simulation from Physical ModelsEDIT: Normally for complex tasks such as these you're not just going to find a full source code dump in a free tutorial. There should be everything you need there to implement this if you want, but you have to do a little thinking on your own.   ;  Thanks, but it also simulate the waves using the formulas. I need a simpler approach and just need to use a normal map and a du/dv map to simulate the water effect.I don't need to deal with the actual waves.It seems that some powerful engines such as Unreal have also used from this manner, because when I move the camera near the water, I just see a flat surface and don't see any actual waves.[Edited by - ehsan2004 on April 23, 2010 11:14:46 AM];  I found a good article here:http://www.docstoc.com/docs/21048644/CM0304-Graphics-Overview-Vertex-and-Fragment-Shader/Here's the algorithm:Draw a quad as water surface rendered in three stages1)Render reflection and store it as texture2)Render refraction and store it as texture3)Render scene with water shader turned on for watersurface– Use a normal map for bump mapping (in tagentspace)– Use a dudv map (derivative of normal map) forrefraction and how light will react and bend on theobject (in tengent space)(blur normal map for generation and blur dudv map again to getrid of sharp features)– Use reflection and refraction texture on water surface   