Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

renderer

> 数据库
Open source

A shader-based software renderer written from scratch in C89

2.8K stars0 likes1 views
WebsiteGitHub

About

A shader-based software renderer written from scratch in C89

Software Renderer

This is a shader-based software renderer written from scratch in C89 with minimal dependencies, available for Windows, macOS, and Linux.

Features

  • Cross platform
  • Minimal dependencies
  • Shader based
  • Homogeneous clipping
  • Back-face culling
  • Perspective correct interpolation
  • Depth testing
  • Alpha testing
  • Alpha blending
  • Cubemapped skybox
  • Skeletal animation
  • Tangent space normal mapping
  • Shadow mapping
  • ACES tone mapping
  • Blinn–Phong reflection model
  • Physically based rendering (PBR)
  • Metallic-roughness workflow
  • Specular-glossiness workflow
  • Image-based lighting (IBL)
  • Orbital camera controls
  • PBR material inspector

Download

Pre-built binaries for Windows, macOS, and Linux are available for download from the Releases page.

Build

To build the software renderer from source, a C89 compiler and development files for your window system are required.

Windows

Install Visual Studio with C++ support and run build_win32.bat.

macOS

Install Command Line Tools for Xcode with the command below and run build_macos.sh.

xcode-select --install

Linux

Install GCC and Xlib with the following commands and run build_linux.sh.

Ubuntu / Debian

bash
sudo apt install gcc libx11-dev

Fedora / RHEL

bash
sudo dnf install gcc libX11-devel

openSUSE / SUSE

bash
sudo zypper install gcc libX11-devel

Bonus

A CMakeLists.txt file is provided for generating project files using CMake (see examples below).

Visual Studio

bash
mkdir build
cd build
cmake -G "Visual Studio 16 2019" ..
start Renderer.sln

Xcode

bash
mkdir build
cd build
cmake -G Xcode ..
open Renderer.xcodeproj

Makefile

bash
mkdir build
cd build
cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release ..
make

Usage

Launch

If the software renderer is launched without arguments, one of the available scenes will be chosen randomly. To display a specific scene (see below), additional arguments should be supplied. The command line syntax is:

Viewer [test_name [scene_name]]

Controls

  • Orbit: left mouse button
  • Pan: right mouse button
  • Zoom: mouse wheel
  • Rotate lighting: A D S W
  • Reset everything: Space

Inspector

For PBR scenes, a material inspector that is very similar to the layers view of Marmoset Viewer is provided. Double click to bring it up.

Screenshots

Scene Command
Viewer blinn azura
Viewer blinn centaur
Viewer blinn craftsman
Viewer blinn elfgirl
Viewer blinn kgirl
Viewer blinn lighthouse
Viewer blinn mccree
Viewer blinn nier2b
Viewer blinn phoenix
Viewer blinn vivi
Viewer blinn whip
Viewer blinn witch
Viewer pbr assassin
Viewer pbr buster
Viewer pbr crab
Viewer pbr dieselpunk
Viewer pbr drone
Viewer pbr helmet
Viewer pbr horse
Viewer pbr junkrat
Viewer pbr ornitier
Viewer pbr ponycar
Viewer pbr robot
Viewer pbr sphere
Viewer pbr spheres

References

Rendering pipeline

  • Tiny Renderer
  • OpenGL ES 2.0 Specification

Physically based rendering

  • glTF 2.0 Sample Viewer
  • SIGGRAPH 2013 Shading Course
  • Physically Based Rendering in Filament

File formats

  • Truevision TGA
  • Radiance HDR
  • Wavefront OBJ
  • Khronos glTF

Miscellaneous

  • Homogeneous clipping
  • Barycentric coordinates
  • Perspective correct interpolation
  • Skeletal animation
  • Tangent space normal mapping
  • Ambient occlusion
  • ACES tone mapping
  • Orbital camera controls
  • Xlib programming guide
  • Type-safe dynamic array

License

MIT License

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C3d3d-graphicsccross-platform

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库