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
Class Architecture
.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.

Forward shading pipeline


Scenes rendered using the forward pipeline

Deferred shading pipeline


Scenes rendered using the deferred pipeline

Mesh shading rendering pipeline


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:

Current render view
Commands execution order

Pipeline state window
Resources window

Time capture view