Watereffect with shaders

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
POi

Watereffect with shaders

Post by POi »

Hello!

I'm looking into creating a watersurface effect with shaders and would like to know if anybody else has been looking at it and can share some thoughts/code/help/directions?

I would also appreciate links to tutorials or other information on the net regarding the desired effect.

(I'm currently using the built-in watersurface node to create my water and would now like a more reflective semi-transparent effect)

/POi
ventilator
Posts: 6
Joined: Fri Feb 20, 2004 9:12 am

Post by ventilator »

basically you just have to render a mirrored camera view to a texture (can irrlicht do that?) and then project this texture onto the water surface in a shader. with a scrolling uv-bumpmap you can perturb the uv-coordinates a little to achieve some waves. the amount of reflection should depend on the camera angle (fresnel term).

(you could also use a cube map instead of a mirrored camera view but then the reflections won't be very accurate.)
Post Reply