Saturday, October 28, 2006
Anti-aliasing: Kill Those Jaggies!
What are Jaggies
We have diffuse and specular lighting and shadows, things look pretty nice . . . except for those jaggies. What are jaggies you say? They are technically called aliasing, and it comes from the fact that computer sreens are made up out of pixels. Pixels have a size, while very small, they still have an area. Aliasing happens when say a line goes through they corner of a two pixels. Well a pixel has to turn all of itself on or none. It can't have half a pixel on. And this creates those jagged edges. Look here at this example. The left image has a smooth looking circle, then on the middle image I've overlayed a grid, imagine each square to be a pixel on the screen. Notice how some squares are only partially filled. Since we can't have only half the pixel glowing we must fill in the whole square. This produces the rough "jagged" image on the right.Show Me Some Real Life Jaggies
Now that you understand what they are, here are two images of our scene, the left one has very prominent jaggies, the right one has much less noticible ones.If we zoom in on the green sphere and on the floor we can really those jaggies. The far right image is the middle one enlarged by a factor of two.