04 enero 2011

Custom Antialiasing

After looking for methods to get antialiasing, i found an useful idea. This method mix a blured image with the original one using a mask. Which mask? A mask wich paints the geometry edges.

#define All_images_scaled_200%

Original Image:

Here is the mask. It has two detection methods; it paints first the edges inside the shape, and then the outside ones, to allow blurring on both sides:

Then, i needed to blur the original image. The blurring method was pretty simple. Inside a loop, i displaced the image both horizontally and vertically, adding each displaced image to the original one. Then i divided the result by the number or reiterations in the loop. This is the result:

And the desired result:

Another example:



No hay comentarios:

Publicar un comentario