1

I Searched many other questions and samples, but I still can't understand what I must do.

What I know about this process is

  1. Create a Render Target for msaa. - Different from SwapChain's Backbuffer.
  2. Draw everything (like meshes) on msaa render target.
  3. Copy the contents of the msaa Render Target to the current BackBuffer using the ResolveSubresource function.

Is this the right process? Or is there a part that I left out?

  • The **Game.cpp** file within the DirectX Toolkit (DXTK12) sets up an MSAA render target that resolves to the backbuffer each frame. After you have worked with 'raw' DirectX 12 (e.g. _Introduction to 3D Game Programming with DirectX 12_) it's a very good idea to graduate to a helper class collection such as DXTK12 as a next step. When you're ready, see also [link](https://stackoverflow.com/questions/66830705/is-it-possible-to-combine-hdr-with-msaa-in-a-directx-12-desktop-application?rq=1). – Maico De Blasio Mar 17 '22 at 02:52
  • On review, MSAA may not be included in the **Game.cpp** template by default. Please see [link](https://github.com/microsoft/DirectXTK12/wiki/Line-drawing-and-anti-aliasing) and [link](https://github.com/microsoft/DirectXTK12/wiki/MSAAHelper). – Maico De Blasio Mar 17 '22 at 04:31

1 Answers1

3

These samples demonstrate using MSAA with DirectX12:

https://github.com/microsoft/Xbox-ATG-Samples/tree/master/PCSamples/IntroGraphics/SimpleMSAA_PC12

https://github.com/microsoft/Xbox-ATG-Samples/tree/master/UWPSamples/IntroGraphics/SimpleMSAA_UWP12

I also cover this (among other topics) in this blog series.

Per the comments, you can also find MSAA covered in the DirectX Tool Kit for DX12 tutorials.

Chuck Walbourn
  • 38,259
  • 2
  • 58
  • 81