Skip to content

fisherman1504/d3d11_project

Repository files navigation

Basic D3D11 Renderer (WIP)

C++ Direct3D 11 GitHub stars License

A basic D3D11 renderer that acts as my personal playground for testing out several graphics concepts:

Description

This renderer utilizes SimpleMath for convenient matrix and vector calculations. The graphical user interface is powered by Dear ImGui library, ensuring an intuitive user experience.

For efficient handling of model and texture loading, integration with assimp is employed. The main scene features an updated version of the well-known Sponza scene, showcasing the capabilities of the renderer.

Note: This project is currently in an early stage of development and is a work in progress. There are numerous areas that require further enhancement and refinement.

Features

  • Blinn-Phong Shading
  • Normal Mapping
  • Shadow Mapping: Directional Light, Adaptive Light Frustum, Basic PCF
  • Sky Box (Cube Map)
  • Deferred Rendering: Spherical Light Volumes
  • Screen Space Ambient Occlusion (SSAO)
  • Screen Space Reflections (SSR)
  • Volumetric Clouds Port From OpenGL
  • Physically Based Rendering (PBR)
  • Screen Space Subsurface Scattering (SSSS)

Gallery

Application Window Shadows
Point Lights Sky Box
Hard Shadows Soft Shadows (PCF)
SSAO Off SSAO On
Vertex Normals Normal Mapping

TODOs

Add volumetric clouds from one of my previous OpenGL projects:

Application Animation
Application Screenshot Video

Pipeline Details

  1. Light Camera Pass: For directional light shadow mapping
  2. Geometry Pass: Render the scene objects
  3. Light Volume Pass: Instanced rendering of light spheres that represent point lights
  4. SSAO Occlusion Map: Calculation of a occlusion map + blur
  5. Lighting Pass: Combine information from previous steps
  6. Forward Pass: Draw objects with separate lighting procedures

G-Buffer Details

The G-Buffer aims to have a very small memory footprint:

Function Texture Format bits per pixel
WS Normals DXGI_FORMAT_R8G8_UNORM 16
Diffuse/Albedo + Specular DXGI_FORMAT_R8G8B8A8_UNORM 32
Depth Buffer DXGI_FORMAT_R24G8_TYPELESS 32

Other Details

  • Light camera frustum is adaptive to view camera frustum (always fully covered)
  • Normals are getting encoded/decoded to Octahedron-normal vectors.
  • 10x buffering for GPU profiler

Built And Tested With

  • Windows 10
  • Windows SDK 10.0.19041.0
  • Visual Studio 2019 (v142)

References

License

This project is licensed under the MIT License, see LICENSE.txt for more information.

About

A basic D3D11 renderer that acts as my personal playground (WIP).

Topics

Resources

License

Stars

Watchers

Forks