Skip to main content
By using EVGA's website and services, you agree to the use of cookies in accordance with EVGA's Privacy Policy. Click here to learn more.

Close

Shader Model 3.0

Shader Model 2.0, included in Microsoft's DirectX 9.0, has been available for over a year now, gaining continued support in both the hardware and software channels of the industry. While it brought in new standards for advanced vertex and pixel shader technology at its release, as core and memory clock rates have increased and advancements have been made on the hardware side of graphic technology, the limitations of model 2.0 has begun to show.

Shader Model 3.0, to be released in Microsoft's latest iteration of DirectX 9.0, is now being adopted by software developers to compensate for the limitations inherent in the previous versions. With greater program lengths and several feature advancements, model 3.0 allows developers to increase the fidelity and complexity of effects that are possible on today's hardware.

The following is a chart that depicts the key improvements of Pixel Shader 3.0 over 2.0*.

Pixel Shader Feature Shader 2.0 Shader 3.0 Description
Shader Length 96 65535+ Allows more complex shading, lighting, and procedural materials
Dynamic Branching No Yes Saves performance by skipping complex shading on irrelevant pixels
Shader anti-aliasing Not supported Built-in derivative instructions Developers can calculate the screen space derivatives of any funciton, allowing them to adjust shading frequencies or over-sampling to eliminate artifacts
Back-face register No Yes Allows two-sided lighting in a single pass
Interpolated color format 8-bit integer minimum 32-bit floating point minimum Higher range and precision color allows high-dynamic range lighting at the vertex level
Multiple render targets Optional Required Allows advanced lighting algorithms to save filtering and vertex work - thus more lights for minimal cost
Fog and specular 8-bit fixed function minimum Custom fp16-fp32 shader program Shader Model 3.0 gives developers full and precise control over specular and fog computations, previously fixed function
Texture coordinate count 8 10 More per-pixel inputs allows more realistic rendering, especially for skin

A similar table charting the key advancements of Vertex Shader 3.0 over 2.0*:

Vertex Shader Feature Shader 2.0 Shader 3.0 Description
Shader Length 256 Instructions 65535 Instructions More instructions allow more detailed character lighting and animation
Dynamic Branching No Yes Saves performance by skipping animation and calculations on irrelevant vertices
Vertex texture No Any number of lookups from up to 4 textures Allows displacement mapping, particle effects
Instancing support No Required Allows many varied objects to be drawn with only a single command
*Charts are courtesy of Microsoft's WinHEC Sponsors page and NVIDIA's D. Sim Dietrich Jr.

Along with longer shader lengths, allowing for a greater amount and more complex instructions, both Shader 3.0 models (pixel and vertex) feature Dynamic Branching. This major feature saves significant processing time by allowing the developer to create true and conditional loops into their shader programs, giving them much more control over the processing of elements such as vertex lighting. By giving their shader programs an 'intelligent' way to process these elements, developers can use dynamic branching to process only elements that will be needed to render a scene, saving processing time and speeding up the shader considerably. Also, by using dynamic branching, developers can use a single vertex and pixel shader and select the appropriate execution path, instead of using customized versions of each shader for every varying situation.

The Microsoft DirectX Instancing API is another key feature supported by Shader Model 3.0. To illustrate the advantages of this new feature, D. Sim Dietrich Jr. of NVIDIA explains it this way:

"Currently, games face limits on the number of unique objects they can display in the scene, not because of graphics horsepower, but often the CPU-side overhead of either storing or submitting many slightly different variations of the same object. For instance, a forest is made up of trees that are often similar to each other, but each would be in a different position, have differing height, branch length, leaf color, and so on. In order to add the desired variation, developers have to choose between storing many separate copies of the tree, each slightly different, or making expensive render state changes in order to rotate, scale, color and place each tree.

"Instancing allows the programmer to store a single tree, and then several other vertex data streams to specify the per-instance color, height, branch size and so on. For instance, a single 1000-vertex tree model would contain the vertex positions and normals, and a 200-element vertex streams would contain positions, colors, heights, and branch length values. Instancing allows the programmer to submit a single draw call, which renders each of the 200 trees, using the same data for the basic tree shape, but then vary it through the per-instance streams."

As you can see, instancing allows for increased object complexity while utilizing relatively low CPU and memory overhead.

To summarize, as advancements are made on the hardware side of graphic technology, so must the software tools that developers use continue to evolve. Shader Model 3.0 breaks out of the limitations of its predecessor, giving developers the ability to create more vivid and complex effects, while leveraging the hardware capabilities of today's high performance graphic cards. A significant step forward, Shader Model 3.0 is an evolution in vertex and pixel shader technology, in terms of ease of use, performance, and shader complexity, which translates into more stunning and lifelike rendered scenes, while keeping the costs to performance and speed at a minimum.