Shader Model 4

Shader Model 4 is a superset of the capabilities in Shader Model 3, except that Shader Model 4 doesn't support the features in Shader Model 1. It has been designed using a common-shader core that gives a common set of features to all programmable shaders, which are only programmable using HLSL.

Instruction Set HLSL functions
Register SetThe register set is accessible through members in constant and texture buffers using HLSL semantics for things like component packing.
Vertex Shader MaxNo restriction
Pixel Shader MaxNo restriction
New Shader Profiles Addedgs_4_0, ps_4_0, vs_4_0, gs_4_1*, ps_4_1*, gs_4_1*
New Effect-Framework Profile Addedfx_4_0, fx_4_1*


* - gs_4_1, ps_4_1, vs_4_1 and fx_4_1 are supported on Direct3D 10.1 or higher.

Shader Model 4 supports a new pipeline stage—the geometry-shader stage—which can be used to create or modify existing geometry. It also includes two new object types: a stream-output object designed for streaming data out of the geometry stage, and a templated texture object that implements texture sampling functions.

Shader Model 4 supports packing rules that dictate how tightly data can be arranged when it is stored. These rules are described in Packing Rules for Constant Variables

The Shader Model 4 Assembly section describes the assembly instructions that the Shader Model 4 and Shader Model 4.1 support.

Related topics

Shader Models vs Shader Profiles