water refraction

Started by
1 comment, last by Drilian 18 years, 2 months ago
im wondering how this is done in say half life 2 lost coast. do they simply render whats under the water from the cameras point of view, then us a normal map to to refract what pixel is sampled. The main thing i dont get is, if they use some depth texture also to determine what pixel also? ie. calulate distance from camera to water plane. Refract this vector, then cast this vector some how based on the distance under the water the mesh is? hope that makes sence
Advertisement
If you enable developer commentary under the audio options and click on the bubble next to the water they actually talk about it a bit. Sorry if you already knew that.
http://www2.ati.com/developer/gdc/D3DTutorial10_Half-Life2_Shading.pdf

That PDF has very explicit information on how their water rendering works (right down to the shader code).

Enjoy!

This topic is closed to new replies.

Advertisement