Reflections with glsl possible?

alright so i’ve created a water shader with waves generated from a noise texture. i’m rendering the water and terrain in the scene.
now i was wondering if i could render a reflection of the terrain onto my water using shaders? i googled around but counldn’t find anything on this.
thanx in advance

in the orange book u can find the enviroment mapping technique implemented on glsl.

here are the sources codes of the orange book :

http://3dshaders.com/home/index.php?option=com_weblinks&catid=14&Itemid=34

Nice chapter over here that tosses in some refraction to boot…

technique I used in my own demos:
1)render scene
2)render scene upturned(height negative, triangle orientation reversed, clip at water surface) to texture
3)render water picking slightly displaced texels from texture based on surface normal.

the GPU Gems book mentioned earlier has a nice chapter about it.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.