The pixel shader — continued
NVIDIA's Chameleon demo shows off both vertex and pixel shaders, and it's a great object lesson in the new capabilities GeForce3 brings to the desktop. Since there's about zero software for the GeForce3 at present other than demos from NVIDIA or its partners, this one's worth watching. Well, what really makes it worth watching is the graphics being created in real time by the GeForce3. To give you a good handle on exactly what this demo is doing, I've captured some high-res, low-compression screenshots, augmented by a video of this thing in action.
Vertex shader stills
At the right, you can see screen shots of the demo. The first three pictures aren't exactly stunning, but they will give you a good sense of what the vertex shader is doing. The top picture shows the vertices of the chameleon model used in the demo. These are the points of data the graphics processor manipulates to create motion. Nearly all of those points in the chameleon's torso, from the neck to the base of the tail, are part of a vertex shader program that flexes the entire polygon mesh as the chameleon walks.
The second picture from the top is the same model represented as polygons. It's a relatively high-poly model by most standards. Now look at the picture below it. That shows the model as a solid object. Note how the solid version of the model is lit. The lighting is the work of the vertex shader, and with as many polys as this model has, it looks quite good. However, though the model is detailed enough to look very smooth, it lacks the extra polys necessary to give texture to the chameleon's skin.
Those first three screenshots could have been produced on a GeForce2. What's impressive about the vertex shader is how it animates things, as we'll see shortly. But the pixel shader is up next.
Pixel shader stills
The bottom three screenshots at the right are truly impressive, even as stills. These pictures show the same chameleon model with the same number of polygons, only this time, the model is mapped with color, specular, and bump maps. The first two pixel shader screenshots, with the brown and green chameleons, show how pixel shader effects can create realistic-looking lighting. The final shot, the "liquid metal" chameleon, is everybody's favorite; it uses cubic environment mapping to simulate the model reflecting its surroundings.
Taken together, the vertex and pixel shaders can create the kinds of effects previously reserved for professional, frame-by-frame rendering packages. This isn't quite Shrek or the Final Fantasy movie, but it's surprisingly close.
Moving pictures
First, you can see my mouse pointer in the video, and the camera jumps around some. The GeForce3 generates this animation in real time, and I can control the motion interactively. The motion is fluid, too.
Next, the torso of the model is bending and flexing as part of a vertex shader program. This model is skinned, and has a 25-bone skeleton. The vertex shader, not the CPU, processes movement calculations. Watch as I move the camera around, especially when it's looking down on the model, and you can see the chameleon's torso move as an organic-looking unit.
Also, notice how the texture of the chameleon's skin shifts along with its colors. These are changing pixel shader effects, including varied specular and reflection maps.
Finally, that's me losing bladder control off camera. Happens every time I watch this demo.
| Windows 8 frightens me, and here's why | 237 |