Hello.
Some newer games have been implementing shader based post-process anti-aliasing methods as an alternative to the comparatively more expensive MSAA. I decided to try my hand at writing a 2D filter that implements such a technique, and the results have been quite good.
My method is based on DLAA, which I read about here:
Before I really began work on the filter, I discovered that Martinsh had previously made some shader-based anti-aliasing filters, and DLAA was one of them. I tried out his DLAA filter, and, unfortunately, the results were dissappointing(No offense to you, Martinsh, your shaders are awesome and much appreciated). His filter wasn’t nearly as effective at smoothing out jaggies as the results seen in the link above. So I made my own.
It finds edges and selectively blurs them along their length, removing jaggies. However, I found that it also blurred textures in the process, so I implemented a crude way to attempt to preserve texture detail that involves a bunch of conditional statements. Unfortunately, this significantly reduces performance, going down from 60fps to 40. It’s lightning fast without texture detail preservation. It’s still pretty fast with it, though.
Here’s some screenshots: (Click the thumbnails and then zoom in for a good view)
Comparison between DLAA and no AA:
No AA:
DLAA with texture detail preservation(perhaps not the best example of the effect, but whatever):
Apparently I can only have 3 attachments per post, so I’ll post a .blend in my next post. Please try out this filter on your own scenes, tell me if it works, what framerates you get, and your opinions on the filter in general. Is it good? Not great, but better than no AA? Or is it totally worthless? Personally, I feel that it’s decent.