Screen-space distortion magic

Published July 10, 2005
Advertisement
Screen-space distortion effects have become more common recently, particularly for funky water and heat haze effects. A few months ago I had a crack at doing this but hit a couple of snags:

- You need a dependant texture read, which in OpenGL can only be done in a vendor-independant manner with GLSL.
- There isn't a 'signed add' blend mode so you have to perform multiple distortions in seperate passes.

Well I went back to it to give it another shot, the first point is pretty much unavoidable (although it does become less with time) however by packing values into textures in different ways and adding an extra pass I can now compose an arbitrary number of distortions together before applying this to the scene.

Composed ditortions (note overlapping noise and the large swirly distortion):


Final distorted image:


The effect isn't really as good looking in static screenshots, you really need to see it moving to appreciate how the lines and objects get warped around the screen. :)

I'm considering writing a short series of articles on 'crazy 2d effects', essencially abusing current 3d hardware for cool effects suitable for 2d games. I dunno whether there's enough demand though, I doubt I could cover anything really new, yet there is so little on 2d graphics other than ages old tilemap type stuff.
Previous Entry Path Tool
Next Entry Effect ideas?
0 likes 2 comments

Comments

NickGeorgia
If you ask me, that's pretty good. I would like to know how.
July 10, 2005 06:37 PM
choffstein
I would appreciate that a lot. Thats a nice effect you have going there.
July 10, 2005 07:48 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement