Getting Started with Direct3D 12direct3d
Originally posted to Chuck Walbourn's Blog on MSDN,
The first thing to do is get up to speed on Direct3D 11 (see Getting Started with Direct3D 11), especially if you are coming from a background of knowing Direct3D 9. Jumping feet-first into Direct3D 12 without a solid grounding in what a Direct3D feature level means, DXGI device-and-swapchain creation, the modern HLSL compiler story, the fate of the legacy DirectX SDK, and the Direct3D 10/Direct3D 11 state model and graphics pipeline design is a recipe for confusion and frustration.
DirectX 12 is an expert API which builds on knowing the ins & outs of DirectX 11. DirectX 12 is an extremely low-level API designed for graphic experts who have a solid understanding of the architecture of modern GPU hardware, and can essentially write the DirectX 11 Runtime from scratch. Both DirectX 11 and DirectX 12 provide access to the same hardware features on Windows 10, but drive the hardware in different ways which can allow a well-optimized DirectX 12 engine to achieve much lower CPU overhead than in DirectX 11.
With that preamble out of the way, you should familiarize yourself with the documentation on Microsoft Docs. Then install Visual Studio 2015 or Visual Studio 2017 with the latest Windows 10 SDK.
Samples: The official samples are on GitHub. For introductory samples, take a look at D3D12HelloWorld (PC desktop and UWP), as well as the Xbox ATG Graphics Introductory Graphics samples. DirectX Tool Kit for DirectX 12 includes some tutorials as well.
Presentations: There’ve been a number of public presentations on Direct3D 12.
DirectX: Evolving Microsoft’s Graphics Platform (GDC 2014): link
Direct3D 12 API Preview (BUILD 2014): link
Better Power, Better Performance: Your Game on DirectX12 (GDC 2015): link
Advanced DirectX12 Graphics and Performance (GDC 2015/BUILD 2015): link
Direct3D Update: (GDC 2016): link
AMD, Intel, and NVidia also have additional materials available online.
Videos: There is a series of YouTube videos on various aspects of Direct3D 12 you should take a look at as well.
Debugging: The debug device (aka the Developer Runtime) on Windows 10 is not installed by any SDK. It is enabled as a Windows Optional Feature called “Graphics Tools”. See this post for details. You should also familiarize yourself with DXGI debugging features.
Note that the WARP12 device is only available when the "Graphics Tools" feature is enabled.. WARP for DirectX 12 is supported on Windows 10 (Version 1709, Build 16299) or later.
Drivers: Keep in mind that not all video hardware have DirectX 12 capable (WDDM 2.0) drivers available. You should make sure you have the latest drivers installed and verify that your video card supports DirectX 12. Otherwise, you’ll have to limit yourself to using the WARP12 software device.
Utilities: The various Direct3D 12 templates make use of a simple header-only helper D3DX12. This does not have nearly the scope of the deprecated D3DX libraries, but is useful in taking care of many of the more mundane aspects of creating the required structures. For support in loading textures, rendering fonts & sprites, loading models, etc. see DirectX Tool Kit for DirectX 12. For graphics math, see DirectXMath. You should use DirectXTex, DirectXMesh, and UVAtlas for content processing as well.
Multi-GPU: See this blog post.
Books: So far the only book I’m aware of that’s been published is Frank Luna’s Introduction to 3D Game Programming with DirectX 12 (2016).
Related: Anatomy of Direct3D 12 Create Device, Direct3D Game Visual Studio templates (Redux), Windows 10 Anniversary Update SDK