XNA UK User Group

A helping hand for bedroom coders throughout the land.
in

This Blog

Syndication

RandomChaos

Under Water Post Process Effect

http://www.youtube.com/v/HCsZ8M6bctM <p><a href="http://www.youtube.com/v/HCsZ8M6bctM">http://www.youtube.com/v/HCsZ8M6bctM</a></p>


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.

Controls
Esc - Exit
AWSD - Translate Camera
Mouse - Rotate Camera

GeneralXNAUnderWaterPP.zip

Comments

 

acemuzzy said:

Useful.  I like it. You should put the time back in (as a translation to both sin() calc and the cos() calc).

Incidentally - you have cos() and cos() which doesn't work quite as well i don't think, and the factor of /5 early in the shader was too high for me.

This same shader is on msdn now - did they nick it from you??

December 7, 2007 7:24 PM
 

Nemo Krad said:

Thanks, glad you like it and find it of some use.

No it is not mine, as I say in the post I got it from Microsoft and more than likely I got it from MSDN.

December 7, 2007 7:52 PM

Leave a Comment

(required)  
(optional)
(required)  
Add

About Nemo Krad

Have been a professional developer since 1995. My skill set ranges from C/C++, VB6,MSSQL, Java Script, VB Script, HTML/ASP, Java, C#, ASP.NET as well as others. I started 3D and games development when the first release of XNA came out in December 2006 and have become addicted to it.