Hardware 3D Series (C++ DirectX Graphics)
From Chilipedia
The Hardware 3D series (HW3D) teaches the Direct3D 11 API and HLSL (High Level Shader Language). This includes basic instruction in the Windows API for the purposes of creating a window and processing input messages. The goal of this seriesis to give the student the skills necessary to create a basic 3D engine in Direct3D in C++ from scratch. This series builds upon the concepts introduced in previous series.
List of Tutorials
Tutorial Number | Title | Release Date | Runtime |
0 | Hardware 3D [Introduction] | December 16, 2018 | 7:48 |
This video talks about the course syllabus for the Hardware 3D tutorial series (the shit we gonna learn) and the prerequisites for following this series (what you need to know, and what you need to have). Use it to get an idea of what this series is about, and whether you have what it takes to follow along. If you don't know this shit, it's okay to just come along for the ride if you interested; you'll learn something at least. But if you decide you wanna dig deep and master the material, check out the links on this page for my C++ series and the 3D Fundamentals series. | |||
1 | Hardware 3D [WinMain] | December 20, 2018 | 10:49 |
To start of our majickal journey of bullshit, we create a fresh, empty Visual Studio solution, configure that fucker to our liking, and write our Windows entry point. Also, some talking about how Windows do. | |||
2 | Hardware 3D [Window Creation] | December 22, 2018 | 18:42 |
Registering a window class and creating our first window. Popping that MSDN cherry too. | |||
3 | Hardware 3D [Message Loop / WndProc] | December 27, 2018 | 17:18 |
Windows message pump, window procedure, and event-driven programming in general. Getting messages, dispatching those bad boys, and processing them. | |||
4 | Hardware 3D [Windows Messages] | December 30, 2018 | 13:30 |
We set out on an expedition into WM_LAND, surveying what messages are sent to our window and trying our hand at handling some keyboard messages. | |||
5 | Hardware 3D [WM_CHAR / Mouse] | January 5, 2019 | 10:28 |
Concluding our exploration of window message bullshits with WM_CHAR and mouse messages. | |||
6 | Hardware 3D [Window Framework] | January 11, 2019 | 28:14 |
In this video I go over the construction of our Window class framework. Of special interest is the mechanism by which a member function is hooked into the Windows message handling system via a static thunking function. | |||
7 | Hardware 3D [Error Handling / Custom Icons] | January 18, 2019 | 25:18 |
You gotta check your goddamn error codes. Also, adding custom icons for your apps is sexy shit. | |||
8 | Hardware 3D [Keyboard / WM_SYSKEYDOWN] | January 26, 2019 | 19:05 |
A nice little component to encapsulate access to the keyboard input. | |||
9 | Hardware 3D [Mouse / Mouse Capture] | January 31, 2019 | 18:05 |
A nice little component to encapsulate access to the mouse input. | |||
10 | Hardware 3D [App class / PeekMessage] | February 3, 2019 | 11:47 |
We create a small App class which will act as the top level of our application object, owning the main window and top level game constructs.
| |||
11 | Hardware 3D [COM (Component Object Model)] | February 8, 2019 | 37:05 |
Direct3D 11 is mostly interfaced with as a collection of COM (Component Object Model) objects. In this tutorial we learn about the fundamental concepts and techniques of Microsoft COM. | |||
12 | Hardware 3D [D3D Architecture / Swap Chain] | February 16, 2019 | 17:45 |
Before diving straight into the Direct3D 11 code, we take a video and look at the overall object architecture of D3D, the process of initializing the core objects, and some specific concepts such as the swap chain and feature level vs. API version. | |||
13 | Hardware 3D [Device Init / Fill Screen / Present] | February 22, 2019 | 19:06 |
In this video we create the mother of all D3D11 objects--the device. We also learn how to present the backbuffer (flip/swap) and how to fill the screen with a solid color, and we create a nifty little class Graphics to hold all this bullshit.
| |||
14 | Hardware 3D [Debug Layer Diagnostics] | March 2, 2019 | 17:42 |
Error reporting and rich diagnostics. These are what separate a professional engineer's approach to tackling a new API from the finger-up-butting of an amateur. | |||
15 | Hardware 3D [ComPtr Smart Pointer] | March 6, 2019 | 10:50 |
Smart pointers make everything better. There is a smart pointer for COM interfaces called ComPtr . We are going to use the fuck out of this beautiful bastard.
| |||
16 | Hardware 3D [First Triangle] | March 9, 2019 | 31:43+ |
Who knew it took so much goddamn code to draw a single freaking triangle? | |||
17 | Hardware 3D [Pipeline Exploration] | March 23, 2019 | 24:23 |
In this video we get a little more familiar with the rendering pipeline as we fiddle with the various settings and try all sorts of variations out. | |||
18 | Hardware 3D [Constant Buffers] | March 30, 2019 | 15:56 |
Constant buffers allow us to pass data along to our shaders that remain uniform across all vertices/pixels/etc. in a single draw call. Use them for stuff like binding your transformation matrices to your vertex shader. | |||
19 | Hardware 3D [DirectXMath] | April 6, 2019 | 18:57 |
The DirectXMath utility library gives you a buttload of ready-made routines for matrix and vector operations. SIMD support is the icing on the cake. | |||
20 | Hardware 3D [3D Cube / Z-Buffer] | April 13, 2019 | 23:03 |
First 3D cube, indexed solid color shader, and Z-buffer setup. Tons o fun to be had in this one bois. | |||
21 | Hardware 3D [Bindable / Drawable System] | April 20, 2019 | 24:32+ |
In this three-part tutorial, we take a break from Direct3D api stuff to set up a better system for organizing Drawables and Bindables. Low coupling, high cohesion, and dynamic bullshits for the win. | |||
22 | Hardware 3D [Texture Mapping] | May 4, 2019 | 22:48 |
In this video we add texture mapping to our arsenal of Bindable abilities. It takes two (Binable s) to dance the texturing tango (you need a Texture (view) and a Sampler ). We also add some code from previous tutorials for the loading of image files.
| |||
23 | Hardware 3D [Test GUI (imgui) / Camera] | May 11, 2019 | 25:20 |
Adding a GUI system (imgui) to the engine to better help us control our tests. | |||
24 | Hardware 3D [Dynamic Lighting / Graphics Debugger] | May 18, 2019 | 28:56+ |
In this tutorial we write our first non-trivial shader program--basic point light pixel shading with specular highlights. We take this opportunity to check out the functionality of the Graphics Debugger (it's pretty dope). | |||
25 | Hardware 3D [Mesh Loading Assimp / Git History Fixing] | June 8, 2019 | 23:12 |
We incorporate the Assimp library into our engine, load a basic mesh, and we also get an impromptu lesson in Git manipulation. | |||
26 | Hardware 3D [Dynamic Vertex / Template Metaprogramming Bullshit] | June 16, 2019 | 43:48 |
This video is a bit of a diversion from the graphics stuff to do a little bit of experimentation and brainstorming with data structure and meta-programming. The goal is to replace the functionality of what you can do with the struct keyword at compile time with a system that does the same things, but at runtime, and with reflection capabilities.
| |||
27 | Hardware 3D [Scene Graph] | June 28, 2019 | 27:50 |
Now it's time to use Assimp as more than just a glorified mesh loader. We're going to create a data structure to load a hierarchical tree of nodes with attached meshes, and the code needed to load that data from an Assimp scene. | |||
28 | Hardware 3D [Node Tree / Transform Propagation] | July 6, 2019 | 29:40 |
In this video we explore the tree structure of the hierarchy of nodes (using ImGui stuff), and we explore how transforms propagate down that tree. We also look into loading model file formats other than .obj (.gtlf), and we upgrade our Assimp dependency to a version that isn't COMPLETELY BROKEN. | |||
29 | Hardware 3D [Cursor Hide / Cursor Confine] | July 13, 2019 | 13:33 |
We take the first step in creating a free mouse-look camera control by adding the ability to hide the Windows cursor as well as the ability to confine the cursor to our window. | |||
30 | Hardware 3D [Raw Mouse Input] | July 21, 2019 | 13:38 |
Using Windows Raw Input to get that sweet-sweet relative mouse movement data directly from the device. | |||
31 | Hardware 3D [First Person Camera] | July 27, 2019 | 17:05 |
First person free mouse look camera using the DirectX Math LookAt matrix transformation function. | |||
32 | Hardware 3D [Material Loading] | August 4, 2019 | 26:50 |
Oh my gawd look at how sexy nanoboi is. Materials are the bomb-diggity. | |||
33 | Hardware 3D [Bindable Codex] | August 12, 2019 | 32:53 |
Time to take out the trash, i.e. clean up the Drawable / Bindable system. Going to create a central repository (Codex in chili parlance) to manage Bindable s to be shared between any Drawable .
| |||
34 | Hardware 3D [Normal Mapping Part 1] | August 27, 2019 | 26:40+ |
Normal mapping is like what texture mapping would be if it actually lived up to its name. Time to learn about tangent space and other such weird things, I guess. | |||
35 | Hardware 3D [Extreme Goblin Energy] | September 21, 2019 | 33:45 |
GOBLINS CHEW AND GOBLINS BITE GOBLINS CUT AND GOBLINS FIGHT STAB THE DOG AND CUT THE HORSE GOBLINS EAT AND TAKE BY FORCE! GOBLINS RACE AND GOBLINS JUMP GOBLINS SLASH AND GOBLINS BUMP BURN THE SKIN AND MASH THE HEAD GOBLINS HERE AND YOU BE DEAD! CHASE THE BABY CATCH THE PUP BONK THE HEAD TO SHUT IT UP BONES BE CRACKED FLESH BE STEWED WE BE GOBLINS! YOU BE FOOD! | |||
36 | Hardware 3D [Renormalization] | September 29, 2019 | 34:45 |
This tutorial is really an assortment a various topics. The main one here is the shader accuracy issue of renormalizing normal vectors, particularly after interpolation. Also, organization of shader code with the HLSL preprocessor is featured prominently. And don't miss the part where we flex our Graphics Debugger muscles again. | |||
37 | Hardware 3D [Sponza Test Map] | October 12, 2019 | 32:26 |
We load the Sponza test scene from Crytek, while also exploring more about materials and how to unscrew them. This scene will form the environment and motivation for several future tutorials. | |||
38 | Hardware 3D [Mipmapping / Anisotropic Filtering] | October 26, 2019 | 22:58 |
Mipmapping and anisotropic filtering to make our textures look a lot sexier when scaled down. | |||
39 | Hardware 3D [Alpha Blending / Transparency] | November 17, 2019 | 37:06 |
Blending things, see-through things. More than meets the eye. | |||
40 | Hardware 3D [DirectXTex / JSON Batch] | December 1, 2019 | 25:06 |
Friendship ENDED with GDI+. Now DirectXTex is my new best friend. Also, JSON happens? | |||
41 | Hardware 3D [Dynamic Constant Buffer] | December 13, 2019 | 1:18:02 |
Crazy dynamic buffer system that allows you to define a nested data structure at runtime that stores its data contiguously. The self-imposed requirements of dynamism, data contiguity, and clean intuitive syntax add up to one ambitious system that took a lot of elbow grease to implement. Video is broken up into 3 section, you only need to watch to 1st section (16min) to understand enough to continue on with the tutorials without getting lost. | |||
42 | Hardware 3D [Stencil Buffer Outline Effect] | December 28, 2019 | 23:05 |
Stencil buffer, multi-pass rendering, and outline special effect. Many 1st-time appearances in this video that will open up many avenues of inquiry and advancement. | |||
43 | Hardware 3D [Render Queue System] | January 18, 2020 | 36:10 |
Introduction of a huge game-changer. The render queue system is going to allow us to decouple the concern of traversing the scene graph from the concern of issuing rending commands, making it easier and more efficient to group draw calls as required by effect, easier to optimize render commands, and easier to execute rendering on concurrent threads. | |||
44 | Hardware 3D ["Visitor" Probe / Static Meta "Bridge"] | February 1, 2020 | 21:43 |
First of two videos where we upgrade our current system with stuff we've been developing up until now (dynamic vertex/constant and Job/Pass). This video gets started by laying down the idea of a dynamic probe for constant buffers in Techniques and improving our dynamic vertex buffer code with a neat metaprogramming technique. | |||
45 | Hardware 3D [Dynamic Technique Composition] | February 16, 2020 | 30:00 |
The second of two videos where we upgrade our current system with stuff we've been developing up until now (dynamic vertex/constant and Job/Pass). This video is all about completing the dynamic composition of techniques, followed by an overhaul of the Model/Node/Mesh system, reinstatement of Sponza, and dynamic probing goodness. | |||
46 | Hardware 3D [Fullscreen Filters (Blur)] | February 29, 2020 | 31:18 |
In this video we explore the concept and theory of fullscreen (screen space) filter passes. We learn a little signal processing theory vis-a-vis convolutions, develop some code for managing offscreen render targets, and implement a couple of simple shaders for fullscreen filter effects. | |||
47 | Hardware 3D [Separated Gaussian Filter] | March 15, 2020 | 24:10+ |
This is a 2-part tutorial. Part 1 uses the blur filter from Tutorial 46 to create an improved outline filter, and then teaches the theory behind an better blur filter implementation (Gaussian filter), as well as the concept of separable filters. Part 2 implements a separated Gaussian filter, and goes on to show a resolution reduction optimization technique for said filter. | |||
48 | Hardware 3D [Render Graph] | March 28, 2020 | 51:39 |
We look at a render graph system for creating smart Pass objects that encapsulate and automate the different render passes in our scene, and for defining the connection between those passes and compiling them into a single render graph. Very THICC video. | |||
49 | Hardware 3D [Input Layout Incredulity] | April 5, 2020 | 25:10 |
A bit of a lighter tutorial to catch our breath. In this video we quickly go over some engine improvements / fixes, and cover a few interesting tidbits about how Direct3D works, including a crucial detail of InputLayout. | |||
50 | Hardware 3D [Multi Camera Wireframe] | April 18, 2020 | 29:10 |
Lite tutorial in which we develop some visualization and flexibility with our camera system. Fun is had with line drawing and depth comparison settings. | |||
51 | Hardware 3D [Shadow Mapping Theory] | May 10, 2020 | 26:40 |
First part in a mini-series on basic dynamic occlusion shadows with shadow mapping. This video covers the fundamental theory behind the shadow mapping technique. |