top of page

DX12 Renderer

The DX12 renderer expands upon the DX11 renderer with new capabilities:

  • DXC Compiler for shader models 6.0+

    • Support for the mesh shading rasterizer pipeline, including programmable mesh shaders and amplification shaders

  • Added in support for compute shaders

  • Introduction of GPU-side data structures:

    • StructuredBuffers (Read Only)

    • RWStructuredBuffers

    • RWTexture2D

  • Supports both the traditional vertex shading pipeline and the mesh shading pipeline

  • Greater control over the GPU pipeline for performance optimization and resource management

Screenshot 2025-02-27 215542.png

Class Architecture

UML class - Page 1 (2).png

Rendering pipelines supported

The DirectX 12 renderer in the engine supports three distinct rendering pipelines: forward rendering, deferred rendering, and a mesh shading pipeline, each tailored for different performance and visual requirements.

  • Forward shading is a straightforward approach where lighting calculations occur per object during rendering. This pipeline is efficient for scenes with limited lights and transparency, making it suitable for simpler environments or objects requiring alpha blending.

  • Deferred shading separates geometry and lighting passes, storing scene data like positions, normals, and material properties in G-buffers. This technique excels in handling complex lighting with numerous dynamic light sources efficiently, at the cost of higher memory usage and limited transparency handling.

  • The mesh shading pipeline leverages mesh shaders and amplification shaders to replace the traditional vertex and geometry shader stages. It introduces a GPU-driven approach for handling culling and instancing directly on the GPU, significantly boosting performance for complex scenes. This pipeline is optimized for handling large numbers of objects and detailed meshes, making it ideal for rendering dense environments with advanced culling techniques like meshlet-based frustum, backface, and occlusion culling.

Together, these pipelines offer flexibility and performance optimization for a wide range of scenarios, from simple scenes to highly complex environments.

Picture1.png

Forward shading pipeline

Untitled video - Made with Clipchamp (11).gif
Untitled video - Made with Clipchamp (9) (1).gif

Scenes rendered using the forward pipeline

Picture2.png

Deferred shading pipeline

Screenshot 2025-03-01 190901.png
Untitled video - Made with Clipchamp (14).gif

Scenes rendered using the deferred pipeline

Picture3.png

Mesh shading rendering pipeline

NewProject-MadewithClipchamp30-ezgif.com-video-to-gif-converter.gif
NewProject-MadewithClipchamp28-ezgif.com-video-to-gif-converter.gif

Scenes rendered using the mesh shading pipeline

DX12Renderer class structure

What I intend to accomplish?

  • Support all the features supported by my DX11 renderer

  • Implement the DX12 graphics pipeline

  • Implement the mesh shading pipeline

  • Implement GPU-driven rendering (meshlet generation, fine grained culling; frustum, backface and occlusion)

  • Implement a deferred rendering pipeline

  • Implement Physically Based Rendering (PBR)

What does the renderer currently feature?

  • Supports all the features supported by my DX11 renderer

  • Supports the mesh shading pipeline with amplification shader

  • Supports GPU-driven rendering (Work In progress)

Features to add to the renderer

  • Add a deferred rendering pipeline

  • Add support for PBR

Graphics Debugging (Pix)

When working with graphics, being able to debug graphical bugs becomes an integral part of the skillset. As I have been developing the DX12Renderer, I have faced a lot of bugs that I would not have been able to fix without using graphics debugging software like PIX. Below are some screenshots of me profiling my projects: ​

Screenshot 2025-01-28 202921_edited.jpg

Current render view

Commands execution order

Screenshot 2025-01-28 202942_edited.jpg

Pipeline state window

Resources window

Screenshot 2025-01-28 203552_edited.jpg

Time capture view

©2025 Anishva Bardhan.

  • logo-gmail-png-file-gmail-icon-svg-wikimedia-commons-0_edited
  • Twitter
  • github
  • LinkedIn
bottom of page