How stanleylin924/dxrtutorials works
Project Type and Purpose
• This is an educational sample repository demonstrating DirectX Raytracing (DXR) usage via a shared C++ Framework and multiple tutorial executables.
• The goal is to provide step-by-step, self-contained sample applications (under “Tutorials”) that each link against a common “Framework” library and a set of external dependencies.
High-Level File Structure
• Top-Level Components
• Framework
– Core C++ library (Framework.cpp / .h), project files (.vcxproj, .props)
– Externals subfolder bundles third-party libraries:
· GLM (math library)
· DXCAPI headers (compiler API wrapper)
· dxcompiler binaries (shader compiler)
• Tutorials
– 14 numbered tutorial subprojects, each an independent executable demonstrating a DXR concept
– Per-tutorial HLSL shader files under Data/
– Word DOCX guides alongside .cpp/.h source
• Configuration & Build
• Solution file (DxrTutorials.sln) orchestrates building Framework + all Tutorial projects
• .gitignore, LICENSE.md, README.md for project metadata
2. Shared Framework Library
3. External Dependencies
a. GLM (Math)
b. DXCAPI (Compiler wrapper)
c. dxcompiler (Shader compiler)
4. DirectX 12 / DXR Runtime (part of Windows OS / GPU driver)
5. GPU Hardware
1. Each Tutorial → links against → Framework
2. Framework → includes/utilizes → Externals (GLM, DXCAPI, dxcompiler)
3. Framework → calls → DirectX 12 / DXR APIs (Acceleration Structures, Ray-Tracing Pipeline)
4. DirectX 12 Runtime → dispatches → GPU Hardware workloads (ray generation, hit shaders)
5. Tutorials → load → HLSL shaders via dxcompiler & framework loader
C. Architectural Patterns & Principles
• Modular layering:
• Tutorial layer (application)
• Framework layer (abstraction/helper APIs)
• External library layer (math & compiler)
• System layer (DirectX / DXR / GPU)
• Single responsibility: each tutorial focuses on one DXR concept, reusing Framework for boilerplate (window creation, device init, swap chain, command lists)
• Dependency Injection: Framework projects reference specific Externals via props files; .vcxproj filters manage linking
D. Key Technologies
• C++17, Visual Studio 2019 build system
• DirectX 12 & DXR API calls (ID3D12Device5, acceleration structures, pipeline state objects, shader tables)
• HLSL shader files compiled via DXC (Shader Model 6+)
• GLM for vector/matrix math