Doyle Thai
5397cdd9b9
Asserts are now more defensive and diagnostic. Initially asserts provide a hard break in the program, and the intention is to disable asserts for release. Having experienced bugs in release mode due to optimisations with asserts off there's little protection against errors that occur in release mode since all asserts are off. Now asserts can be used in release mode whilst still evaluating the expression, and allowing user messages/diagnostics to console. |
||
---|---|---|
docs | ||
src | ||
.gitignore | ||
readme.md | ||
Win32DTRenderer.sln |
DTRenderer
DTRenderer is an attempt to build a simple software renderer from the ground up. The main goal is to build an intuitive understanding of graphics mathematics, rendering pipeline and core concepts. It runs as a Win32 program with minimal dependencies.
The following resouces have been largely informative to my understanding of the software renderer,
Building
DTRenderer is a Win32 program and can be compiled with build.bat which requires Microsoft Visual Studio cl.exe to be in the Windows path. It is originally built using Visual Studio 2017, older versions are still somewhat compatible, albeit there are some switches which have been renamed in the 2017 edition.
The Visual Studio solution file is provided as a thin wrapper for interfacing with the Visual Studio debugger and can not be used to compile.
Milestones
- 2D Software Rendering
- Alpha Blending
- Bilinear Filtering
- Correct Color Space Pipeline (SRGB <-> Linear)
- Rasterisation
- Texture Mapping
- Translation, Rotation, Scale
- 3D Model Rendering
- Full Bright, Flat, Gouraud Lighting
- Orthographic, Perspective Projections
- Translation, Rotation, Scale
- Custom Wavefront Obj Loader (minimal subset)
- Hot-Reloadable DLL for Renderer Code (taken from Handmade Hero)
- SIMD "Optimisation" (with a grain of salt, tried to with some % improvements)
Libraries
The external libraries that have been used,
- STB Single File Libraries
- STB Image (for image loading)
- STB TrueType (and RectPack) (for creating bitmap font)
Debugging Libraries
These libraries are non-essential and used for validating results and debugging the program.
- STB ImageWrite (for debugging renders, TrueType output etc.)
- EasyProfiler (for profiling)
- TinyRenderer (for comparing data output for validity of results)