Jump to content

  • Log In with Google      Sign In   
  • Create Account


Heat Distortion Effect


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Quat   Members   -  Reputation: 403

Like
0Likes
Like

Posted 19 September 2012 - 11:22 AM

I am wanting to add a heat distortion effect to my fire particle system.

The NVIDIA fire demo (http://http.developer.nvidia.com/GPUGems/gpugems_ch06.html) uses the following technique:

We rendered a particle system of "heat" particles in a texture target. During the final compositing, we simply used the (red, green) values of each "heat render target" pixel as a (u, v) per-pixel 2D texture coordinates displacement during the texel fetch of the "rendered scene" texture target.


What I am wondering, is why do you think they render into a separate "heat render target". I have a forward pass that renders refractive materials like glass, and it seems to me I can render the "heat" particle system during this pass.
-----Quat

Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 7139

Like
0Likes
Like

Posted 20 September 2012 - 12:03 AM

The problem is, that you can't (except maybe latest technology) read from and write to the same render target. The disortion effect needs to read back texels from the source image, therefore you can't render it directly to the same render target.

Edited by Ashaman73, 20 September 2012 - 12:04 AM.


#3 MJP   Moderators   -  Reputation: 10950

Like
1Likes
Like

Posted 20 September 2012 - 12:35 AM

If you render out the distortion amount first, it lets you use a cheaper shader that doesn't sample a render target. Then you just have one pass where you sample a render target. This might be a big deal if there was a lot of overdraw in their particles. Plus it would have allowed them to accumulate the distortion at a lower resolution if they'd wanted to.

#4 Scoob Droolins   Members   -  Reputation: 238

Like
0Likes
Like

Posted 21 September 2012 - 01:38 PM

Think of the heat effect as just one type of scene distortion which uses the current backbuffer as a source texture. There's also frosted/rippled glass, raindrops, ice, and so on. These materials should be drawn last, so our approach is to resolve the current backbuffer into a same-sized texture, then sample it with a screen projection. Shaders which use this texture don't use any lighting, it's already pre-lit. Works nicely for a lot of materials, and doesn't cause any serious performance issues.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS