Tuesday, October 02, 2007

Generic XNA - Under Water Post Process Effect

I guess the idea for this came from Bioshock, a few weeks a go a friend of mine asked if it was possible for my to create an underwater post process effect for him (thanks for the idea Dave). I already had a shader from Microsoft (can't remember where I got it) that I used for a nice ripple effect on 2D images, so I thought I should be able to adapt that to do this effect. And that is exactly what I have done with this.

It is not perfect as I am using a shader that was not intended for this effect, but it gives you an idea of how to go about doing it.

Here is a shot of the shader being used as intended on a background image.

The post processing code in this sample is all thanks to Chr0n1x, with out his tutorial written for the HazyMind Engine I would not have a clue how to create post processing effects.

Esc - Exit
AWSD - Translate Camera
Mouse - Rotate Camera


  1. I actually put together a small sample on this the otherday... Have to see how it compares to mine.


  2. Hi Mykre,

    Had a look at your PP, I think mine is a little different, have only ran yours I will have to have a look at your shader and see how you are doing what you are doing.

    Yours looks a little more subtle than mine, but then you can tweak the parameters if you really need to.


Note: Only a member of this blog may post a comment.