More filtering fun

Published November 24, 2006
Advertisement
One unexpected but rather nice side effect of the new RenderTarget structure is that it means I can write texture filters that operate on a source and dest target, which makes it dead easy to write reusable texture effects. It also means I can have a single interface for all of them, which means switching and swapping to fit is trivial (ie. switching between a fragment shader blur, a multitexture based blur or a brute force blending blur based on the available hardware).



Here I've got the same radial blur as before, but moved into a reusable class and drawn on top of the regular sprite. Surprisingly cool looking, I think I'll probably use it to indicate invincibility or some other powerup state. Especially if I animate the blur so it fades in and out.

The one snag is that because you can't have alpha in the textures you're limited to either no blending or additive blending. This isnt' too bad really as full screen effects (like heat haze) generally don't need blending, and glows are usually done with additive anyway.

I found this page of filters, and I think I'll be trying a few different ones out to see how they look. I've also got some old code for doing different types of blur for glow (mainly gauissian based) that I want to convert to this new way of doing things and test instead of the radial glow in the last post.
Previous Entry Post Processing Overload
Next Entry More filtering
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement