×

Method and apparatus for rendering anti-aliased polygons

  • US 5,123,085 A
  • Filed: 03/19/1990
  • Issued: 06/16/1992
  • Est. Priority Date: 03/19/1990
  • Status: Expired due to Fees
First Claim
Patent Images

1. In a computer system comprising a central processing unit (CPU), memory and a graphic display, a process for rendering anti-aliased polygons on the graphic display, said polygons represented by a color, a set of coordinates which indicate the vertices of the polygon and a depth value indicative of the depth of the polygon, said process comprising the steps of:

  • providing a frame buffer located in memory in which pixels representative of a graphic image are stored for output to the graphics display, each pixel in the frame buffer being identified by a color value, a z buffer value and a representation indicative of coverage, said z buffer value representative of the depth of the pixel and the coverage representation representative of the extent of coverage within a pixel, said pixels in the frame buffer being identified as the background pixels;

    identifying the pixels which comprise the polygon, said step comprising the steps of;

    computing the pixel locations of the edges which form the polygon according to the vertices of the polygon;

    forming a coverage representation for each edge pixel by determining the area within the pixel the polygon covers;

    computing the depth value of each edge pixel, said depth value being equal to the depth value of the polygon at the pixel;

    computing the pixel locations of the pixels interior to the polygon, said pixel locations being between edge pixels;

    forming a coverage representation for each interior pixel indicative of full coverage; and

    computing the depth value of each interior pixel, said depth value being equal to the depth value of the polygon at the pixel;

    compositing each edge and interior pixel of the polygon with a corresponding background pixel at the location in the frame buffer the pixel is to be composited to, thereby forming a composited pixel which is a new background pixel and is stored in the frame buffer, the step of compositing comprising the steps of;

    if the depth value of the polygon pixel is less than the depth value of the corresponding background pixel;

    setting the color of the composited pixel to be equal to a first proportionate blend of the color of the polygon pixel and the color of the background pixel, said proportionate blend dependent upon the extend of coverage of the polygon pixel;

    setting the depth value of the composited pixel to be equal to the depth value of the polygon pixel; and

    setting the coverage representation of the composited pixel to be equal to a first proportionate blend of the coverage representation of the polygon pixel and the coverage representation of the background pixel;

    if the depth value of the polygon pixel is greater than the depth value of the corresponding background pixel;

    setting the color of the composited pixel to be equal to a second proportionate blend of the color of the polygon pixel and the color of the background pixel, said proportionate blend dependent upon the extent of coverage of the background pixel;

    setting the coverage representation of the composited pixel to be equal to a second proportionate blend of the coverage representation of the polygon pixel and the coverage representation of the background pixel; and

    setting the depth value of the composited pixel to be equal to the depth value of the background pixel;

    if the depth value of the polygon pixel is equal to the depth value of the corresponding background pixel and the combination of the coverage representations of the polygon pixel and the background pixel represents full coverage;

    setting the color of the composited pixel to be equal to the color of the polygon pixel;

    setting the coverage representation of the composited pixel to represent full coverage; and

    setting the depth value of the composited pixel to be equal to the depth value of the background pixel and polygon pixel;

    if the depth value of the polygon pixel is equal to the depth value of the corresponding background pixel and the combination of the coverage representations of the polygon pixel and the background pixel does not indicate full coverage;

    setting the color of the composited pixel to be equal to the first proportionate blend of the color of the polygon pixel and the color of the background pixel, said proportionate blend dependent upon the extent of coverage; and

    setting the depth value of the composited pixel to be equal to the depth value of the polygon pixel; and

    setting the coverage representation of the composited pixel to be equal to the first proportionate blend of the coverage representation of the polygon pixel and the coverage representation of the background pixel;

    storing in the frame buffer the composited pixel at the location of the corresponding background pixel thereby replacing the background pixel with the composited pixel to form a new background pixel;

    retrieving the pixels stored in the frame buffer and actuating the pixels on the graphic display at a color indicated by the color value and intensity indicated by coverage representation, to generate the graphic image on the graphic display;

    wherein each of the pixels individually retain a depth value, a color value and a coverage representation and are individually composited with corresponding background pixels, each background pixel individually retaining a depth value, a color value and a coverage representation, to render high quality, anti-aliased polygons.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×