A low-level software renderer from (almost all) first principles for learning purposes.
Go to file
Doyle Thai e7ebe1e243 Update dqn lib 2017-06-24 15:33:18 +10:00
docs Add documentation 2017-06-09 18:24:37 +10:00
src Update dqn lib 2017-06-24 15:33:18 +10:00
.gitignore Add platform api to access from dll 2017-05-11 22:51:39 +10:00
Win32DTRenderer.sln Add mem diagnostics, prepare for bitmap rotation 2017-05-17 02:49:33 +10:00
readme.md Add documentation 2017-06-09 18:24:37 +10:00



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.

DTRenderer Demo

The following resouces have been largely informative to my understanding of the software renderer,


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.


  • 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)


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)