These are screens from my DX10 implementation of Morphological Antialiasing, following the work done here. From left to right they show the original aliased image, the base edge detection, the calculated blending weights and finally the antialiased output.

The only real points of departure from the link above are that I make use of a different, cheaper, method for the initial edge detection - which still seems to give acceptable results - and I also roll the edge length calculations in to one shader using multiple render targets which also buys some gain in performance. But by and large it is just a re-implementation under DX10.

You can download the demo here. Controls:

R - View raw, unprocessed image
A - View antialiased image
E - View base edge detection output
V - View calculated vertical edge length texture
H - View calculated horizontal edge length texture
W - View calculated blending weights
Left/Right Arrow - Cycle test image

I went ahead and included the same test images I included with the last antialiasing demo and also included a screenshot from Team Fortress 2 to provide a little more spice. I am pretty happy with the quality of the results - there are obviously still some jaggies but the technique does a good job of smoothing out the image while still keeping the image nice and sharp.

When you close the program it will spit out a a simple text file giving you some basic timing values. I have only tested it on two pieces of hardware so far: the Radeon 4850 in my desktop and the 9600M GS in my laptop. On the 9600M GS the whole thing clocks in at around 20 ms, depending on the edge complexity of the image. On the 4850 it clocks in at around 10 ms.

Overall the whole thing is fairly unoptimized. There are a number of things I know I could do faster, and certainly it uses more memory then it needs to right now (though it is convenient for visualizing the whole process). I suppose it might seem moot at this point considering PC drivers are now coming out implementing MLAA as one of their user selectable antialiasing modes - but there are of course platforms where you still have to do the work yourself. And besides... it is fun.