Water refraction and heat shimmer

Hi there,

i’m looking for some material about water light refraction and heat shimmer (done in fragment shaders). Has anybody some ideas for these effects, or better than that some examples, or sample code ???

Thanks

Schelm

There’s a heat haze effect on in 3dlabs’ GLSL demo and also a glass refraction shader.
http://developer.3dlabs.com

The underlying method is to distort a rendered image after you’ve drawn it but the detailed requirements are quite different.

Render to texture then use that texture on a screenspace mesh for the heat haze, you can have a mesh of verts to distort or a pixel level displacement. Typically you need to sort the heat haze in screenspace w.r.t. the scene and draw it at the right time if it has the potential to be occluded.

For water you need to use the view vector and surface normal to compute the refraction vector and that leads to a texture coordinate displacement in the refracted texture. To make this look good though you need refraction + reflection textures mixed using Fresnel’s equations.