Home

News

Forums

Hardware

CPUs

Mainboards

Video

Guides

CPU Prices

Memory Prices

Shop



Sharky Extreme :


Latest News


- OCZ Unveils the CrossOver USB 2.0 Flash Drive
- NewerTech Unleashes the First "Quad Interface" SATA Docking Station
- Lian-Li Launches New Card Reader and HDD Bracket Cooling Kits
- Crucial Triples Up With New Three-Channel DDR3 Kits
- OCZ Adds Three New Fatal1ty Power Supplies
News Archives

Features

- SharkyExtreme.com: Interview with Microsoft's Dan Odell
- SharkyExtreme.com: Interview with ATI's Terry Makedon
- SharkyExtreme.com: Interview with Seagate's Joni Clark
- Half-Life 2 Review
- DOOM 3 Review

Buyer's Guides

- November Value Gaming PC Buyer's Guide
- September Extreme Gaming PC Buyer's Guide
- July High-end Gaming PC Buyer's Guide

HARDWARE

  • CPUs

    - Intel Core i7-965 XE & Core i7-920 Review

  • Motherboards

    - Intel DX48BT2 (X48) Motherboard Review
    - AMD 790GX Chipset Review
    - Gigabyte GA-MA790FX-DS5 Motherboard Review
    - AMD 780G Chipset Review

  • Video Cards





  • Per-pixel lighting (the lighting we were trying to get to) calculates the lighting for each pixel on the fly using the NVIDIA Shading Rasterizer. For per-pixel lighting/shading to be used, a developer must create a "normal map" for a texture map, but this is easy because they just have to run a height map through a filter. A normal is basically the direction a pixel or polygon is facing, so a normal map is a map of the direction pixels are facing. Each value means a different direction, which is used when calculating lighting.

    The normal map is then encoded into a texture map that is to use per-pixel lighting. A normal map is similar to a light map in that it calculates lighting on a per-texel basis for the object being lit. Unlike with light mapping and like vertex lighting, per-pixel lighting calculates lighting on the fly. But unlike with vertex lighting, the normal map gives a normal for each pixel, which is then used to calculate lighting. Vertex lighting, as we said, calculates lighting from normal at each of the polygons vertices, then interpolates the lighting among the pixels of the polygon.

    This image shows how the lighting values for each pixel are calculated in per-pixel lighting.

    Here is a picture of a normal map. In the normal map on the right, green means the pixel is facing towards the up right, yellow means up left, red means down left, and blue means down right.

    Here is a picture of the normal map on a quad with a diffuse yellow light coming from the upper right hand corner.

    So through the magic of normal maps, you get a quad that looks like a diffuse lit sphere.

    Here is another example of per-pixel lighting.

    Just for comparison, there is a form of lighting in between per-pixel and vertex known as Phong shading. Phone shading interpolates normal values for each pixel from the normal values of each of the vertices of a polygon, then it calculates the lighting of each pixel from these normal values in a way similar to how per-pixel lighting calculates these values for each pixel from a normal map.





    Copyright © 2002 INT Media Group, Incorporated. All Rights Reserved. About INT Media Group | Press Releases | Privacy Policy | Career Opportunities