History & Shader Models

A Shader Model (SM) defines the feature set a shader may use; the target profile (e.g.

2.1 Timeline

A Shader Model (SM) defines the feature set a shader may use; the target profile (e.g. ps_6_6) combines stage and model.

SM 2.0 (vs_2_0, ps_2_0) HLSL introduced (jointly developed alongside NVIDIA Cg); limited instruction counts dynamic branching, vertex texture fetch, longer shaders Direct3D 10 (Vista) unified architecture, geometry shaders, constant buffers, integer ops, Texture2D/SamplerState objects cube map arrays, Gather

hull/domain (tessellation), compute shaders, UAVs, structured buffers, dynamic linkage

register spaces, resource arrays/descriptor indexing, root signatures in HLSL new DXC compiler (LLVM/Clang, DXIL output), wave intrinsics, 64-bit integers SV_ViewID, SV_Barycentrics native 16-bit types (-enable-16bit-types), denorm modes

DXR 1.0 ray tracing libraries (lib_6_3) packed 8-bit dot products (dot4add_u8packed), VRS shading-rate input

mesh & amplification shaders, DXR 1.1 (RayQuery), sampler feedback, WaveMatch/WaveMultiPrefix*

ResourceDescriptorHeap (bindless), 64-bit atomics, [WaveSize], compute derivatives, IsHelperLane, pack/unpack intrinsics

HLSL 2021: templates, operator overloading, bitfields, logical-operator changes advanced texture ops (integer sampling, raw Gather), writable MSAA textures, SampleCmpLevel, quad any/all

work graphs, SV_StartVertexLocation/SV_StartInstanceLocation, SampleCmpBias/SampleCmpGrad, [WaveSize(min, max)] long vectors, Shader Execution Reordering (SER), opacity micromaps (check the DirectX-Specs repository for the final feature list and preview features such as cooperative vectors)

2.2 FXC vs DXC

FXC (fxc.exe, d3dcompiler_47.dll) DXC (dxc.exe, dxcompiler.dll) 6.0+ (no SM 5.x output) DXIL (LLVM-based) or SPIR-V legacy, frozen actively developed, open source (github.com/microsoft/DirectXShaderCompiler) HLSL "classic"

HLSL 2016/2018/2021 (default since DXC 1.7) D3D11, D3D12 with SM 5.1 D3D12 SM 6.x, Vulkan, Xbox

Rule of thumb: use DXC for all new work. Use FXC only to support D3D11-era targets (D3D11 cannot consume DXIL). Clang is gaining an HLSL front end (upstream LLVM "clang-dxc") intended to eventually succeed DXC.