Code Sample: Dynamic Checkerboard Rendering Using Microsoft DirectX* 12

Published:08/09/2018   Last Updated:08/09/2018

File(s): Download
License: Intel Sample Source Code License Agreement
Optimized for...  
OS: 64-bit Microsoft Windows® 10
Hardware: GPU required
(Programming Language, tool, IDE, Framework)
Microsoft Visual Studio* 2017, Microsoft DirectX* 12
Prerequisites: Familiarity with Visual Studio, DirectX 12 API


Checkerboard Rendering (CBR) is a technique that produces full-resolution pixels with a significant reduction in shading and minimal impact on visual quality. CBR is fully compatible with modern post-processing approaches to anti-aliasing and it can be implemented in both forward and deferred rendering pipelines.

Dynamic Resolution Rendering (DRR) is an established technique that dynamically adjusts the resolution to which you render the 3D scene and then scales this to the output back buffer.

The accompanying sample code demonstrates both CBR and DRR and provides a base implementation in a forward rendering pipeline; additionally, the accompanying white paper describes an implementation in a deferred rendering pipeline. While our focus was on integrated graphics processing units (GPUs), our implementations for both forward and deferred rendering have been tested to run on both AMD and NVIDIA discrete GPUs.

Get Started

The sample is designed to "build and run" and is an augmentation of the DirectX 12 MiniEngine from the Microsoft DirectX-Graphics-Samples. Simply clone (or download) the repository, build the MiniEngine\ModelViewer\ModelViewer_VS17.sln solution and run. Both CBR and DRR are enabled by default, they (along with multiple other post processes) can be enabled or disabled by pressing the 'backspace' key to bring up the toggle menu. Download the code from GitHub* and read  Checkerboard Rendering for Real-Time Upscaling on Intel Integrated Graphics, v. 12 to learn more.

CBR Options

The CBR options in the toggle menu are as follows:

  • Enable: Enable or disable CBR.
  • Check Shading Occlusion: During movement which spans multiple pixels per frame: If enabled; Attempt to retrieve the correct shading information from frame N-1's pixels. If disabled; Always assume the shading is occluded and extract the shading color from frame N.
  • Show Derived Motion: For each pixel which had motion derived from the depth buffer, render it as red in the color buffer.
  • Show Missing Pixels: For each pixel which our algorithm determined the shading information was missing, render it as red in the color buffer.
  • Show Occluded Pixels: For each pixel which our algorithm determined the shading information was occluded by movement, render it as hot-pink in the color buffer.
  • Show Pixel Motion: For each pixel which our algorithm determined motion vectors must be used to fetch the shading information from frame N-1, render it as green in the color buffer.
  • Depth Tolerance: The depth tolerance (linear from near clip to far clip) used by our algorithm to determine if the shading information is occluded.

DRR Options

The DRR options in the toggle menu are as follows:

  • Enable: Enable or disable DRR.
  • Desired Frame Rate: The target frame rate for the DRR algorithm.
  • Force Scale: Force DRR to run at the scale specified by Min Scale.
  • Min Scale: The low-end limit to DRR's resolution scaling.
  • Resolution Increments: The increments DRR will use when scaling resolutions.
  • _Advanced/Frame Rate Delta Resolution: The amount of 'delta' (or headroom) to allow in the frame rate before switching resolutions
  • _Advanced/Frame Rate Low Pass K: The K filtering value used when accumulating the latest frame time.
  • _Advanced/Rate of Change: The rate at which DRR's internal scale changes.
  • _Internal/Frame Rate: The frame rate DRR is tracking, this is filtered by the value specified with 'Frame Rate Low Pass K'.
  • _Internal/Scale: DRR's internal scale, once this passes the 'Resolution Increment' threshold the resolution will change.


Crytek Sponza Model

Jalal El Mansouri, Rendering Rainbow Six Siege, GDC 2016

Graham Wihlidal, 4K Checkerboard in Battlefield 1 and Mass Effect: Andromeda, GDC 2017

Doug Binks, Dynamic Resolution Rendering Updated, 2011

Microsoft DirectX-Graphics-Samples, 2018

For additional references, see Checkerboard Rendering for Real-Time Upscaling on Intel Integrated Graphics, v. 12.

Update Log

Created August 8, 2018

Product and Performance Information


Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804