Distortion filters (Heat haze, stealth-field)

Post-process filters.
Known issues - different depth calculation accuracy on the different video cards.

Heat haze distortion:
Source
Small video

Stealth-field distortion:
Source
Small video

Improved and simplified examples by wezu: viewtopic.php?f=8&t=17593

that looks great :exclamation:

This looks great! You really are a Shader-pro :slight_smile:

Very nice!
Can I know how you learned cg programming ? (I try to find some good cg tutorial…

Really nice. Congratulations!

Wow, again!
Now it’s starting to feel like x-mass, you’ve got more of them? ;]

I wouldn’t mind seeing this (and the flare) usable via CommonFilters.

…and if you are taking requests then I for one would love to see a stealth-field-distortion shader as seen in oh-so-many-games (kotor, fallout 3, avp just to name a few).

Thanks to all for the feedback )

@Nemesis#13 Thanks, but actually i just studing. This is quite simple shader, but requre scene presetting. More complex shaders, like a shadow or parallax with the matrix transformation makes my brain smoke and get out through the ears )

@Gatou I used only panda manual and links from wiki. Also I explored existing samples from forum and SDK. I think that really does not matter a programming language - Cg or GLSL or so. The most important thing - the general principle of obtaining a particular effect.

@wezu Now I am trying to make volumetric smoke/clouds effect, but i think it’s not too hard to change this sample into something like “stealth-field-distortion” - at some of these days I’ll try to make it. Howewer, I foresee the same problems with the depth calculation, as in this example.

The promised stealth-fileld )

The stealth sample runs only with 7-8 FPS for me, but it’s great to see yet another cool effect in Panda. Very motivating, thanks.

Hmm… seems that i need to find some more video cards for testing )

On my configs (GF 7300 and HD 4850) i had 60-70 and 150-200 FPS respectively

Nice one ninth! Very cool effect! =D
Runs nice here at 530 FPS on a gtx560ti (but I guess that’s not the kind of cards you need to test :smiley:, anyway… :stuck_out_tongue:)

The effect is very nice!
Radeaon HD 4650: 120fps

Keep up great work.

This is awesome! Thank you for sharing it.

I’m using the shader in my code - for exhaust from a spaceship. In trying to adjust the position of the shader, I can’t seem to set the roll using p.setHpr(0, 180, 0). Is there some other setting that stops it from rotating? No matter what I set it to, it’s always heat rising up.

Thanks again for sharing - it looks and works beautiful :slight_smile:

@ralphhogaboom
It’s just a standart particle effect, which you can control by usual way. For example, you can set renderParent = p, and then rotate p as you wish, or/and you can change *.ptf file.

In fact, I think it’s not a good idea to make two separate root, probably the best way - setting up the different masks as I did in the second example.