DirectX 11 Practice Project

After completing my first renderer using Vulkan API, I decided to dive deeper into modern graphics APIs. My choice landed on DirectX 11 because there are so many resources advising you to start with version 11. Also DirectX 11 widely used API in the game development industry for Windows applications. To gain hands-on experience, I created a project available on GitHub: Link.

For this project, I focused on several key aspects:

1. Windows API Integration

  • Set up a Win32 window using the Windows API, managing window messages and resizing events.
  • Handled keyboard and mouse input using raw input events.
  • Optimized window performance by reducing unnecessary message processing.

2. Shader Management and HLSL Programming

  • Developed vertex and pixel shaders using HLSL to implement various rendering effects.
  • Compiled and loaded shaders dynamically, enabling real-time updates.
  • Used constant buffers for efficient data transfer between the CPU and GPU.

3. Lighting Models and Real-Time Shading

  • Implemented the Phong reflection model for realistic lighting, including ambient, diffuse, and specular components.
  • Added Blinn-Phong shading for improved specular highlights and smoother reflections.
  • Studied and experimented with Lambertian reflectance for basic diffuse lighting.
  • Explored different types of lights, including directional, point, and spotlights.

4. Primitive Rendering and Mesh Management

  • Created geometric primitives such as cubes, spheres, and cylinders using vertex and index buffers.
  • Implemented structured mesh handling for efficient drawing and transformations.
  • Developed a batching system to optimize draw calls and reduce overhead.

5. Camera System and Scene Navigation

  • Implemented a free-movement camera system with orbit controls.
  • Processed user input for scene navigation and object interaction.
  • Added smooth transitions and camera interpolation for better visualization.

6. Debugging and Performance Optimization

  • Used the DirectX Debug Layer to catch API errors and warnings.
  • Integrated PIX for Windows to analyze frame timings and GPU performance.
  • Optimized resource binding to minimize redundant state changes and improve efficiency.

7. Importing 3D Models with Assimp

  • Integrated the Assimp library to load various 3D model formats.
  • Processed and rendered imported models within a DirectX 11 application.
  • Implemented support for textures during model import.

8. User Interface with ImGui

  • Integrated the ImGui library for a customizable and interactive UI.
  • Designed windows and widgets for controlling rendering parameters and scene objects.
  • Added real-time parameter tuning for shaders, camera, and lighting models.

But this is not the end of this project, as I wrote in previous post, I need it to make a multiplatform renderer using at least Vulkan API and DirectX 11.

Here are some of my current goals:

  1. Free-movement camera system with first-person controls.
  2. Implement support for materials during model import.
  3. Implement different types of lights, including directional and spotlights.
  4. Implement normal mapping to enhance surface details without increasing geometry complexity.
  5. Implement bunch of new cool shaders for tests.

This post will be updated!

Leave a comment

From the blog