Skip to content

Camden-Kirkpatrick/3D-Software-Renderer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3D Software Renderer (C)

A CPU-based 3D software renderer written in C.
All rendering is done on the CPU; SDL2 is used only for window creation, input handling, and displaying the final framebuffer.

Features

  • Custom 3D rendering pipeline (no OpenGL / Vulkan / DirectX)
  • Perspective projection
  • Triangle rasterization
  • Z-buffer (depth testing)
  • Barycentric coordinate interpolation
  • Texture mapping
  • Flat lighting
  • OBJ mesh loading
  • Left-handed coordinate system

Screenshots

Wireframe Lighting Textured model

Demo

2026-01-24.15-28-30.mp4

Implementation Overview

The renderer follows a traditional software pipeline:

  1. Model → World → View → Projection transforms
  2. Perspective divide and viewport mapping
  3. Triangle setup and rasterization
  4. Per-pixel depth testing
  5. Texture sampling and shading

SDL2 is used only as a platform layer; all math, rasterization, and visibility logic is implemented manually.

Build Notes

This project was developed on Windows using MinGW and SDL2. The repository focuses on demonstrating rendering techniques rather than providing a fully portable build system.

Prebuilt binaries are included for convenience.

Why this project exists

This project was built to deeply understand how 3D rendering works at a low level, without relying on GPU APIs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published