Original Link: https://www.anandtech.com/show/800



Update #2: NVIDIA has gotten permission from Microsoft to announce their DirectX 8.1 compliance as well. Take a look at page 3 for updated information regarding DirectX 8.1 and the differences between ATI's and NVIDIA's pixel shaders.

Update: Please see page 3 for updated information regarding DirectX 8.1, pixel shader 2.0, and what NVIDIA's response to the situation is.

It seems that Microsoft, not other video card manufacturers, has become the driving force behind the latest generation of video cards. The introduction of the DirectX 8 API has forced video card manufacturers to produce products that are compliant with this technology, meaning that many "new" video card features are not all that innovative, rather just implementations of Microsoft's DirectX 8 specification.

The high demands of DirectX 8 has already forced NVIDIA to release a product that supports 2 of the API's most touted features: vertex and pixel shaders. Promising fast, photo-realistic rendering, we knew it was just a matter of time before the vertex shader and pixel shader programmable parts got implemented in a broad range of high end video cards, not just NVIDIA's GeForce3. It seems that that time has begun to arrive with ATI's most recent technology announcement.

Although not a full product announcement, we recently had a chance to talk to ATI about their latest Radeon 2 technology that promises not only DirectX 8.0 compliance but also DirectX 8.1 compliance. Much like ATI's TRUFORM technology was an implementation of DirectX 8's n-patch technology, today we learn about how ATI's SMARTSHADER technology is an implementation of DirectX 8.1's vertex and pixel shader technologies.



Shader Basics

As mentioned before, both programmable pixel shaders and programmable vertex shaders are items called for by DirectX 8. You may recall from our GeForce3 Technology article that both items work to change the graphics processor from a fixed function processor to a programmable processor.

This is done by producing pixel shaders and vertex shaders that are able to compile and run low level code, much like a CPU does. Previous generation video processors performed fixed function transform and lighting calculations on vertex information and fixed texturing, filtering, and blending operations on pixel information. Since the operations were fixed, not only did new features have to be implemented in an API in order to be used, video processors had to be hard programed to perform these operations. Programmable pixel and vertex shaders give a new way of modifying vertex and pixel information by allowing a graphics processor to manipulate this data without any loss of speed.

Vertex shaders are essentially tiny programs that modify vertex data as it is received. The key benefits to programmable vertex shaders is that they allow many image enhancing effects, such as procedural deformation, shadow volumes, and many other types of effects including particle systems, lens effects, matrix palette skinning, and keyframe interpolation. Information reguarding common vertex shader effects is given in the table below.

Vertex Shader Effects
Effect
Description
Example
Procedural Deformation Allows for a change in object shape as by performing mathematical calculations. A lifelike animated bubble
Shadow Volumes The vertex shader create transparent volumes that extend behind objects away from light sources, creating realistic shadows A scene with multiple light sources and realistic shadows
Fur Rendering Creates realistic fur by giving vertices thin elongation to simulate fur A fuzzy rabbit
Particle Systems Animates large number of particles by assigning and modifying physical properties such as mass, velocity, acceleration, ect. Creation of fire, sparks, explosions
Lens Effects Distorts an object's shape to give the appearance of being viewed through a lens Viewing an object through a gun scope
Matrix Palette Skinning Allows skeletally animated characters with many bones to move and bend naturally Lifelike animation of characters
Advanced Keyframe Interpolation Animation and morphing effects are created by blending two or more keyframes Animation of complex facial expressions and speech

Like vertex shaders, pixel shaders are also small programs, except in this case the programs modify the attributes of individual pixels as they travel through the rendering pipeline. By altering the appearance of individual pixels, lighting effects are now made much more realistic. The programmability of the pixel shaders gives developers the ability to create customized effects and shading algorithms. As a result of the large number of pixels present in a rendered scene, pixel shader operations have to be more simple than vertex shader operations, since the calculations must be computed many more times in a scene.

Both vertex shaders and pixel shaders are specifications created by and called for by Microsoft's DirectX 8.0 API and it is this specification that NVIDIA's GeForce3 graphics chip is designed around. ATI's new SMARTSHADER technology goes one step further than the competition by including support for Microsoft's newly announced DirectX 8.1 API which ATI promises will provide even more realistic effects.



SMARTSHADER

Really, the only difference between DirectX 8.0 and DirectX 8.1 when it comes to programmable vertex and pixel shaders is that the pixel shader version has been upgraded. DirectX 8.0, the specification that NVIDIA designed their nfiniteFX engine around, calls for support of pixel shader version 1.1. DirectX 8.1 brings the pixel shader version up to version 1.4, offering a few new benefits. The table below summarizes the differences between pixel shader 1.1 and 1.4.

Pixel Shader v1.1 vs Pixel Shader v1.4
Pixel Shader v1.1
Pixel Shader v1.4
Maximum Texture Inputs 4 6
Maximum Program Length 12 instructions (up to 4 texture sampling, 8 color blending) 22 instructions (up to 6 texture sampling, 8 texture addressing, 8 color blending)
Instruction Set 13 address operations
8 color operations
12 address / color operations
Texture Addressing Modes 40 Virtually unlimited

As you can see, pixel shader 1.4 offers a larger variety of possible combinations demonstrated by the larger number of texture addressing modes. This is possible because pixel shader 1.4 uses more basic instructions but allows for a greater number of combinations of these instructions.

The new pixel shader specification brings the capabilities of the programmable pixel shader to new levels. Examples of effects only possible with DirectX 8.1 and pixel shader 1.4 are summarized below.

Pixel Shader 1.4 Effects
Effect Description Example
True Phong Shading Performs a complex mathematical calculation on pixels to accurately light and shade pixels according to the properties of the material and the light shining on it Realistic rendering of materials
Anisotropic Lighting Uses bidirectional reflectance distribution functions (BRDFs) to determine how light bounces off a surface as a function of the viewing angle More lifelike lighting of hair
Advanced Bump Mapping Allows for the use of horizon mapping to create bump maps that cast shadows; Also allows the combination of multiple bump maps Rippling water created by both wind and an object falling in the water
Procedural Textures Uses mathematical calculations to create detailed textures without requiring any memory storage since the objects are created on the graphics chip Creation of a marble column without the use of any textures

Another advantage of pixel shader 1.4 is that Microsoft has reworked the language in which the shaders are written. There are two parts to a pixel shader: an address shader and a color shader. The address shader performs up to eight mathematical operations on textures or addresses. The color shader also consists of up to eight instructions that blend and modify color values. In DirectX 8.0, the language used to program these aspects of the pixel shader were different, making for a large learning curve. DirectX 8.1 simplifies things by combining the language used to program these components of the pixel shader, making it easier to write both the address shader programs and the color shader programs.


Update: 7/18/01

NVIDIA has quite a bit to say regarding ATI's DirectX 8.1 and pixel shader 1.4 claims. Although NVIDIA can not comment on what is in DirectX 8.1 and what the new version of the pixel shader (as a result of an NDA with Microsoft), they can respond to ATI's claims that only the SMARTSHADER engine can perform the functions listed in the above table.

NVIDIA supports the above "pixel shader v1.4 effects," as demonstrated by existing GeForce3 demos. Phong shading is done in the nfiniteFX engine on the GeForce3 and has been since the release of the card. Although ATI claims that only they can perform "true" phong shading calculations, NVIDIA states that there is no standard phong shading formula. Regardless, the Zoltar GeForce3 demo uses NVIDIA's phong shading effects, done in hardware.

The anisotropic lighting effect for realistic hair is used in NVIDIA's fur demo in combination with the fur rendering capability of the vertex shader. Claims that only the SMARTSHADER engine support this feature are incorrect, according to NVIDIA.

Advanced bump mapping techniques are also available with NVIDIA's nfiniteFX engine. The engine can clearly create shadows for bump maps and also supports the blending of multiple bump maps. The GeForce3's ability to perform these functions are demonstrated in the Zoltar demo.

Finally, NVIDIA also has the ability to use procedural textures for the creation of an object. Although no demo or screen shot was available in time for this update, NVIDIA should be supplying us with proof soon.

As this story unfolds, we will provide you with more information as we come across it.


Update: 7/19/01

Since yesterday, NVIDIA has cleared a few things up with Microsoft and has been able to provide us with a bit more information regarding the DirectX 8.1 capabilities of the GeForce3.

It seems that there are two versions of a new pixel shader implemented in DirectX 8.1: pixel shader 1.2/1.3 and pixel shader 1.4. ATI's SMARTSHADER supports pixel shader 1.4, but NVIDIA's nfiniteFX engine supports pixel shader 1.2/1.3, also implemented in DirectX 8.1. Until we get more information regarding the differences between pixel shader 1.2/1.3 and 1.4, we won't say too much about this issue, but since NVIDIA's GeForce3 does support pixel shader 1.3 it therefore is DirectX 8.1 compliant.



Conclusion

SMARTSHADER, like NVIDIA's nfiniteFX engine, is ATI's implementation of pixel and vertex shaders. Both NVIDIA's solution as well as ATI's solution promise to bring new levels of detail to games, with ATI's SMARTSHADER offering more in terms of capability. What does this mean for games?

Well, unfortunately, we can't say right now. With the extremely long development time for games, it is hard to know when DirectX 8 games will finally hit the scene, if ever. The whole situation eerily reminds us of T&L technology that was implemented over a year ago. When announced, manufacturers promised that T&L would change the face of gaming, providing higher polygon counts and more realistic gaming. All T&L supporters claimed that games would quickly take advantage of this new technology, leaving those without a T&L engine in their graphics card in the dust. Over a year later, have we really seen that? Sure, there are games out there that are optimized for T&L cards, but nearly all of them will run almost the same on cards without a T&L engine. We are still waiting for the day when games require a T&L engine or look drastically better with T&L capabilities enabled. Could pixel and vertex shaders end up in the same way?

With the backing of Microsoft and the standardization they have created, we are fairly certain that games taking advantage of pixel and vertex shaders will eventually come out; but the question is when. ATI promises that by the time their card is available, there will be games out that take advantage of their SMARTSHADER technology. And since they claim that their next generation product will be ready by "the end of summer," we don't have much longer to wait. Naturally, we must remain skeptical until the first batch of DirectX 8 games come out and require pixel and vertex shaders for enhanced gameplay.

And sure, ATI's SMARTSHADER does offer a greater realm of possibilities since they support DirectX 8.1 and remain backwards compatible with DirectX 8.0, but how long will it be before DirectX 8.1 games come out? The effects do look good in demos, but until they are implemented in a game they offer little more than eye candy. Undoubtedly NVIDIA's next generation of graphics processors will feature DirectX 8.1 and pixel shader 1.4 support. If no games need support for these features until well after the Radeon 2 comes out, NVIDIA really will not be hurt by having a product out that is a step behind.

We are just going to have to wait and see what real world advantages SMARTSHADER technology offers over NVIDIA's nfiniteFX technology. There is no question that the product will be impressive; let's just hope that the advantages offered will actually be used.

Log in

Don't have an account? Sign up now