MaximumPC 2006 12

(Dariusz) #1

r&dBREAKING DOWN TECH —PRESENT AND FUTURE


64 MAXIMUMPC DECEMBER 2006


V


ideocards wouldn’t be all that interest-
ing if each new generation delivered
only faster frame rates—we also expect
them to render video and graphics that
look more realistic. Antialiasing is one tool
that videocard developers use to achieve
that objective. To fully understand anti-
aliasing, and the numerous antialiasing
techniques in use today, we fi rst need to
identify antialiasing’s prey: aliasing. And
to do that, we need to take a quick look at
display technology.
LCD is the most popular display tech-
nology in use these days, so we’ll use that
as our example; but the basic principles
are similar whether you’re talking about
CRT, OLED, or DLP. Each of these displays
creates an image using pixels; the pixels
in an LCD computer monitor are perfectly
square, with four 90-degree corners. There
are millions of them in even a moderately
high resolution display—1280x1024, for
instance—arranged in perfectly ordered
rows and columns. Each pixel consists of
three subpixels—one red, one green, and
one blue—arranged side by side by side.
Each subpixel is capable of producing 256
levels of brightness via regulated voltage
changes. Multiply 256 levels of red by 256
levels of green by 256 levels of blue and
you arrive at the now-familiar palette of
16.8 million colors.

STAIR-STEPPER
Objects consisting exclusively of 90-
degree angles, such as squares and
rectangles, look great on pixel-based
monitors because they fi t perfectly into
the display’s graph paper-like grid system.
Unfortunately, such orderly shapes are
relatively unusual in nature; and computer
displays have much more diffi culty render-
ing the curvaceous lines that are common
in the real world. Pixels are fi xed in size

and must be fi lled—you can’t illuminate
a fraction of a pixel—so curved or diago-
nal lines and spherical objects inevitably
appear to have jagged edges wherever
groups of pixels lie outside what should be
the object’s boundary.
If those edges are especially thin, they
take on a sparkly appearance; if they’re
part of an animated or moving object, they
tend to shimmer. These and similar unde-
sirable artifacts are known as aliasing, and
they’re the bane of gamers, graphic art-
ists, and animators.
Fortunately, techniques exist to combat
aliasing and cure the “jaggies” by fooling
the human eye into perceiving the edges
of digitized curves to be as smooth as the
proverbial baby’s bottom. These antialiasing
software routines are typically executed by
your videocard’s GPU.
In a nutshell, antialiasing renders more
pixels in an effort to simulate the fi ll-in effect
that smaller pixels would have on the lines.
Because the GPU can’t actually create
smaller pixels, it simulates them by altering
the shading or coloring of individual pixels
on either side of the line to create a smooth-
er, more natural appearance. If the object’s
outline is black and the background is white,
for example, antialiasing will arrange pixels
with intermediate color values along the
edge to soften the transition. The effect isn’t
perfect, as you’ll see if you zoom in on the
object in question, but it’s far better than
nothing at all.
Antialiasing in 3D graphics processors
has taken a variety of forms since 3Dfx

shook up the gaming world with the intro-
duction of full-screen antialiasing (FSAA)
at the turn of the millennium. Back then,
“supersampling” was the most common AA
technique. In supersampling, an entire frame
is rendered inside the GPU at several times
the resolution at which it will be ultimately
displayed. If the resolution is quadrupled,
for example, each displayed pixel will corre-
spond to four off-screen pixels. These extra
pixels are then sampled and colored based
on the average color values of the pixels
surrounding them. When the image is scaled
down and sent to the display, the edges
along curved lines appear smoother.
Supersampling is highly effective, but it’s
also extremely memory-bandwidth intensive.
This wasn’t a problem when typical display
resolutions were 640x480 or 800x600 and
graphics processors were expected to pro-
cess pixels numbering in the hundreds of
thousands, but even today’s most powerful
GPUs can’t perform supersampling at high
frame rates when multiple millions of pixels
are involved.

EFFECTIVE COMPROMISES
In order to reduce the crushing workload on
the videocard, engineers have developed a
more effi cient AA technique known as multi-
sampling. The key distinction between multi-
sampling and supersampling is that multisam-
pling samples only the pixels that exist along
the edges of objects, as opposed to the entire
display area. An algorithm determines how
much of each pixel resides within and outside
of the boundaries of each object and then

White Paper: Antialiasing


How videocards fi t an


analog curve into the


square digital world.


BY GORD GOBLE

HOW IT WORKS Multisampling: before and after


Because lines
that are near-vertical
or near-horizontal
can’t be drawn using
the grid of pixels that
PCs use to render
images, they fre-
quently appear stair-
stepped, as shown
here.

Using
multisampling,
the GPU renders
trouble areas at a
higher resolution, then
outputs the resultant
bits at the appropriate
resolution to render
much smoother-look-
ing lines.

ALIASED ANTIALIASED
Free download pdf