microsoft / DirectXTK12

The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++
https://walbourn.github.io/directx-tool-kit-for-directx-12/
MIT License
1.45k stars 371 forks source link

Shader Model 6 usage by default #95

Closed walbourn closed 3 years ago

walbourn commented 3 years ago

The FXC.EXE compiler is considered legacy, and for Direct3D 12 programs the recommendation is to use the new DXC.EXE (DXIL) compiler toolset instead.

The CompileShaders.cmd script has supported this for a while with the argument dxil, but the projects continue to build the Shader Model 5.1 shader set by default.

The DirectXTK12 projects should use Shader Model 6 / DXC by default.

Note that I already updated the directx-vs-templates back in May 2021 to validate Shader Model 6 support on the device.

walbourn commented 3 years ago

The 2017 projects that use Windows 10 SDK (17763) still use FXC due to some known issues, so the NuGet packages still use FXC/5.1 shaders.

When VS 2022 is out, I'll be looking to retire 2017 projects.

Alternatively, I may update the 2017 projects to require Windows 10 SDK (19041) instead of relying on the 'always there' SDK 17763.