Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

More filtering fun

Sign in to follow this  


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.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!