Shader Model 4
Shader Model 4
Shader Model 4 is a superset of the capabilites in shader model 3 with the exception that shader model 4 does not support the features in shader model 1. It has been designed using a common-shader core which provides a common set of features to all programmable shaders, which are only programmable using HLSL.
| Feature | Capability |
| Instruction Set | HLSL functions |
| Register Set | The register set is accessible through members in constant and texture buffers using HLSL semantics for things like component packing. |
| Vertex Shader Max | No restriction |
| Pixel Shader Max | No restriction |
| New Shader Profiles Added | gs_4_0, ps_4_0, vs_4_0, gs_4_1*, ps_4_1*, gs_4_1* |
| New Effect-Framework Profile Added | fx_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.
Packing Rules for Constant Variables (DirectX HLSL)
Shader Model 4 Assembly (DirectX HLSL)
See Also
Shader Models vs Shader Profiles