heat haze

Started by
1 comment, last by red_sodium 19 years, 7 months ago
When doing a heat haze shader effect (doom 3 like) in the fragment shader part you need to get the fragment coordinate and convert it to [0,1] range. How exactly is this done? It's just a variable that gets multiplied by the fragment coord but I don't know what goes into that variable. Also after this screen coord has been converted to [0,1] range and it has been shifted by a deform magnitude it needs to be adjusted for non power of two coords. This is again another multiply but I'm not sure what value to use. I understand the whole process of doing this effect but I'm stuck on how to get the two values I mentioned above to get it to work correctly. Thanks!
Advertisement
Have you looked in GPU Gems? IIRC there's a chapter on this effect in it.

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

Striiideerr: I'm guessing by your name that you've watched the HL2 preview video then :P
"Learn as though you would never be able to master it,
hold it as though you would be in fear of losing it" - Confucius

This topic is closed to new replies.

Advertisement