Shader Model 4.1

HIS Technology, January 1, 2008

The Unified Shader Model, known in Direct3D 10 as Shader Model 4.0, uses a consistent instruction set across all shader types. All shader types have almost the same capabilities - they can read from textures, data buffers and perform the same set of arithmetic instructions.

However, the instruction set is not completely the same between different shader types - for example, only the pixel shader can read textures with implicit coordinate gradients; only the geometry shader can emit extra rendering primitives and so on.

Early shader models (Shader Model 1.x) used very different instruction sets for vertex and pixel shaders, with vertex shaders having much more flexible instruction set. Later shader models (2.x and 3.0) reduced the differences, approaching Unified Shader Model.

Shader Model 4.0 [SM 4.0] - the new shader model provided with DirectX 10 - consists of three programmable shaders: Vertex Shaders (VS), Pixel Shaders (PS) and Geometry Shaders (GS). All shader stages offer the same base functionality, which is implemented by the Shader Model 4.0 Common Shader Core. In addition to the base each of the three shader stages (vertex, geometry, and pixel) offers some unique functionality only to that stage. Shaders in earlier models could be authored in an intermediate assembly language. With SM 4.0 shaders are only authored in DirectX High Level Shader Language [HLSL]. Offline compilation of shaders into byte code is still supported and recommended.

Among Shader Model 4.1’s features is ‘The ability to select the MSAA sample pattern for a resource from a palette of patterns, and retrieve the corresponding sample positions. The fact that 2x, 4x and 8x multi-sample anti-aliasing (MSAA) all have to be supported (and with exactly the same sampling patterns) would be a big gain for gamer.

In order to use Shader Model 4.1, you need to upgrade your graphics card to a newer one that supports it. This means you need a DirectX 10.1 compatible card. DirectX 10.1 is part of Vista Service Pack 1.