how to add water effect to an image
- by brainydexter
This is what I am trying to achieve: A given image would occupy say 3/4th height of the screen. The remaining 1/4th area would be a reflection of it with some waves (water effect) on it.
I'm not sure how to do this. But here's my approach:
render the given texture to another texture called mirror texture (maybe FBOs can help me?)
invert mirror texture (scale it by -1 along Y)
render mirror texture at height = 3/4 of the screen
add some sense of noise to it OR using pixel shader and time, put pixel.z = sin(time) to make it wavy
(Tech: C++/OpenGL/glsl)
Is my approach correct ? Is there a better way to do this ? Also, can someone please recommend me if using FrameBuffer Objects would be the right thing here ?
Thanks