Sign in to follow this  

Underwater Effect

This topic is 3553 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, does anyone have any thoughts or ideas on how to implement a distortion effect that mimicks being underwater (all wiggly). I'm thinking something to do with bump mapping but i have no idea where to go from there. Any ideas?

Share this post


Link to post
Share on other sites
You can easily implement it with a post process shader. The shader needs 3 textures: diffuse, distortion map 0 and distortion map 1. Diffuse texture contains the scene that you want to distort. distortion maps 0 and 1 are two different displacement maps that contain x and y UV shift values. I believe you can just use regular normal maps for that, as long as they have that wavy look you need.

In the shader you sample and lerp two distortion maps using screen UVs, obtaining the distortion vector. After that, you fudge the screen UVs using the distortion vector and sample the diffuse texture using fudged UVs.

To animate this whole process, just keep on changing the lerp factor from 0 to 1 and backwards.

Share this post


Link to post
Share on other sites

This topic is 3553 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this