Skip to main content
Shader Models vs Shader Profiles

The High Level Shading Language for DirectX implements a series of shader models. Using HLSL, you can create C-like programmable shaders for the Direct3D pipeline. Each shader model builds on the capabilites of the model before it, implementing more functionality with fewer restrictions.

Shader model 1 started with DirectX 8 and included assembly level and C-like instructions. This model has many limitations caused by early programmable shader hardware. Shader model 2 and 3 greatly expanded on the number of instructions, and constants shaders could use. They are much more powerful than shader model 1, but still carry some of the existing limitations of the first shader model.

Starting with Windows Vista, shader model 4 is a complete redesign. It allows unlimited instructions and constants (within hardware constraints of your machine), has templated objects to make texture sampling cleaner and more efficient, and has the fewest restrictions of any shader model. It does however require the Windows Driver Model which is only available on the Windows Vista (or later) operating system.

Shader Profiles

A shader profile is the target for compiling a shader; this table lists the shader profiles that are supported by each shader model.

Shader ModelShader Profiles
Shader Model 1 vs_1_1
Shader Model 2 ps_2_0, ps_2_x, vs_2_0, vs_2_x, ps_4_0_level_9_0, ps_4_0_level_9_1, ps_4_0_level_9_3, vs_4_0_level_9_0, vs_4_0_level_9_1, vs_4_0_level_9_3, lib_4_0_level_9_1, lib_4_0_level_9_3
Shader Model 3 ps_3_0, vs_3_0
Shader Model 4 cs_4_0, gs_4_0, ps_4_0, vs_4_0, cs_4_1, gs_4_1, ps_4_1, vs_4_1, lib_4_0, lib_4_1
Shader Model 5 cs_5_0, ds_5_0, gs_5_0, hs_5_0, ps_5_0, vs_5_0, lib_5_0

(Although gs_4_0, gs_4_1, ps_4_0, ps_4_1, vs_4_0, and vs_4_1 were introduced in shader model 4.0, shader model 5 adds support to these shader profiles for structured buffers and byte address buffers.)


Differences between Direct3D 9 and Direct3D 10:

Direct3D 9 introduced shader models 1, 2, and 3.

Direct3D 10 introduced shader model 4.

Direct3D 10.1 introduced shader model 4.1.


Effect Profiles

An effect profile is the target for compiling an effect/shader; this table lists the effect profiles that are supported by each version of Direct3D.

Differences between Direct3D 9 and Direct3D 10:

Direct3D 9 introduced effect-framework profiles fx_1_0 and fx_2_0.

Direct3D 10 introduced effect-framework profile fx_4_0.

Direct3D 10.1 introduced effect-framework profile fx_4_1.

Direct3D 11 introduced effect-framework profile fx_5_0.


Note  These legacy effects profiles are deprecated.

Related topics

Reference for HLSL