A software (CPU) and hardware (GPU) rasterizer built with C++ and DirectX 11. You can switch between both rasterizers at runtime and change various render settings on the fly.
- Full rasterization pipeline on the CPU (vertex transformation, triangle rasterization, depth testing, pixel shading)
- Lambert diffuse + Phong specular shading (BRDF)
- Normal mapping
- Multiple shading/debug modes: observed area, diffuse only, specular only, combined
- Depth buffer visualization
- Bounding box visualization
- DirectX 11 rendering pipeline
- HLSL pixel shading (same lighting model as software)
- Texture sampling modes: point, linear, anisotropic
- Toggle between software and hardware rasterizer (F1)
- Cull mode cycling: back, front, none
- Camera with mouse look and keyboard movement
- OBJ mesh loading with diffuse, normal, specular and glossiness textures
- Custom math library (vectors, matrices)
- Fire mesh with partial coverage (alpha blending)
Camera
WASD / Arrows: Move
LShift: Sprint
RMB: Rotate
LMB: Rotate horizontally, move forward/backward
RMB + LMB: Move up/down
Settings
F1: Toggle software/hardware rasterizer
F2: Toggle rotation
F3: Toggle fire mesh
F4: Cycle sampler state (hardware only)
F5: Cycle shading mode (software only)
F6: Toggle normal mapping (software only)
F7: Toggle depth buffer display (software only)
F8: Toggle bounding boxes (software only)
F9: Cycle cull mode
F10: Toggle uniform clear color
F11: Toggle FPS display
The project uses CMake.
cmake -S . -B build
cmake --build buildRequires the DirectX 11 SDK (Windows).



