1. A method for anti-aliasing an image, the method comprises the steps of: a) rendering a plurality of objects of the images to a buffer to produce a rendered image; b) while rendering the plurality of objects, maintaining edge information of objects of the plurality of objects in a most foreground position; and c) filtering the rendered image based on the edge information, wherein the filtering is done by applying a two-dimensional spatial filter.