Skip to content

Releases: Speed126/Software-Renderer

Software Renderer v1.0.0

Choose a tag to compare

@Speed126 Speed126 released this 06 Sep 12:02

Software Renderer v1.0.0

First public release of Software Renderer.

A C++20 CPU software rasterizer with OBJ loading, depth buffering, clipping, Lambert lighting, and perspective-correct texture mapping.

Highlights

  • CPU-only triangle rasterization
  • Bounding-box traversal with barycentric coordinates
  • Per-pixel depth buffering
  • Back-face culling
  • Model, view, projection, and viewport transforms
  • Six-plane homogeneous clipping
  • Perspective-correct UV and normal interpolation
  • Directional Lambert lighting
  • Triangulated OBJ loading
  • Positive and negative OBJ indices
  • Procedural checker textures and P3 PPM texture loading
  • Uncompressed 24-bit TGA output
  • Configurable camera, lighting, rotation, resolution, and output path
  • Automated CTest coverage
  • GitHub Actions builds on Windows and Ubuntu
  • Clang ASan/UBSan validation

Requirements

  • CMake 3.20 or newer
  • C++20-compatible compiler

No runtime dependencies beyond the C++ standard library.

Build

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --parallel
ctest --test-dir build -C Release --output-on-failure

Example

Linux, macOS, or MinGW:

./build/renderer assets/orbital.obj --output output.tga --width 1400 --height 1000

Visual Studio / PowerShell:

.\build\Release\renderer.exe assets/orbital.obj --output output.tga --width 1400 --height 1000

Running the renderer without arguments uses the included assets/orbital.obj demo and writes an 800×800 output.tga.

Supported Input

OBJ support includes:

  • triangle faces
  • positions
  • UV coordinates
  • normals
  • positive indices
  • negative indices

Models with polygon faces should be triangulated before loading.

Textures can use the built-in procedural checker or an ASCII P3 PPM file.

Testing

The project includes 15 CTest entries covering areas such as:

  • vector and matrix math
  • barycentric coordinates
  • depth ordering
  • shared triangle edges
  • back-face culling
  • homogeneous clipping
  • OBJ parsing
  • perspective-correct interpolation
  • texture sampling
  • framebuffer behavior
  • TGA output
  • CLI validation
  • end-to-end rendering

CI currently passes on Windows, Ubuntu, and an Ubuntu Clang ASan/UBSan configuration.

Downloads

Prebuilt x64 packages are available for Windows and Linux.

  • Windows x64Software-Renderer-v1.0.0-windows-x64.zip
  • Linux x64Software-Renderer-v1.0.0-linux-x64.tar.gz

Each package includes the renderer, the bundled orbital.obj demo model, the README, and the MIT license.

SHA-256 hashes for both packages are provided in SHA256SUMS.txt.

License

Released under the MIT License.