Prefiltered antialiased lines using half-plane distance functions

  • Authors:
  • Robert McNamara;Joel McCormack;Norman P. Jouppi

  • Affiliations:
  • Compaq Computer Corporation Systems Research Center, 130 Lytton Avenue, Palo Alto, CA;Compaq Computer Corporation, Western Research Laboratory, 250 University Avenue, Palo Alto, CA;Compaq Computer Corporation, Western Research Laboratory, 250 University Avenue, Palo Alto, CA

  • Venue:
  • HWWS '00 Proceedings of the ACM SIGGRAPH/EUROGRAPHICS workshop on Graphics hardware
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

We describe a method to compute high-quality antialiased lines by adding a modest amount of hardware to a fragment generator based upon half-plane edge functions. (A fragment contains the information needed to paint one pixel of a line or a polygon.) We surround an antialiased line with four edge functions to create a long, thin, rectangle. We scale the edge functions so that they compute signed distances from the four edges. At each fragment within the antialiased line, the four distances to the fragment are combined and the result indexes an intensity table. The table is computed by convolving a filter kernel with a prototypical line at various distances from the line's edge. Because the convolutions aren't performed in hardware, we can use wider, more complex filters with better high-frequency rejection than the narrow box filter common to supersampling antialiasing hardware. The result is smoother antialiased lines.Our algorithm is parameterized by the line width and filter radius. These parameters do not affect the rendering algorithm, but only the setup of the edge functions. Our algorithm antialiases line endpoints without special handling. We exploit this to paint small blurry squares as approximations to small antialiased round points. We do not need a different fragment generator for antialiased lines, and so can take advantage of all optimizations introduced in the existing fragment generator.