Bilinear Filtering
Obviously, point sampling isn't the way to go. How would we be able to concentrate on a Quake2 deathmatch while being exposed to gratuitous pixelization along every texture edge? Fortunately for us, there are a couple more filtering methods out there.
Bilinear Filtering
Bilinear filtering does a bit more than plain old point sampling. It adjusts the color of the pixel by computing a weighted average of the 2 by 2 array of textels that lie nearest to the center of the calculated pixel. Basically, bilinear filtering finds the weighted average of the color of the block of 4 textels, and then it assigns that color to the pixel. This helps smooth the transition between two pixels by blending the colors, but it also may cause images to appear somewhat blurred. Bilinear filtering is pretty much the standard, and most 3D accelerators should have bilinear support.
Here are some examples of point sampling and bilinear filtering taken from ATI's Rage 128 demo.
![FS 3D Guide: Filtering and Lighting [ Point sampled filtering @ 640 x 480 ] > View Full-Size in another window.](images/pointsample-s.jpg) Point sampled filtering
|
|
![FS 3D Guide: Filtering and Lighting [ Bilinear filtering @ 640 x 480 ] > View Full-Size in another window.](images/bilinear-s.jpg) Bilinear filtering
|
|
You can clearly see the blockiness and pixelization throughout the point sample picture. In the bilinear picture, everything's smoother with no noticeable blockiness. Bilinear filtering is good and all, but there are some artifacts that even it can't solve. These artifacts are called "depth aliasing" artifacts. Objects on the screen get smaller and smaller the farther they move from the viewpoint. As an object gets smaller the texture that's mapped onto the object also becomes smaller. Eventually, the texture becomes so compressed that depth aliasing artifacts begin to appear.