Software renderer

A tiny software renderer built from scratch using C++20.

简体中文

Features

Project

  • Cross-platform(Linux/Windows)
  • Written in C++20

Base

  • Two modes: Wireframe and Rasterisation.
  • Simple homogeneous clipping/Back-face culling.
  • Perspective correct interpolation.
  • Texture mapping.

Shader

  • Blinn-Phong

Getting Started

Install dependencies:

then

mkdir cg
cd cg
git clone https://github.com/star-hengxing/Hinae
git clone https://github.com/star-hengxing/software_renderer
cd software_renderer
xmake build -w main
xmake run main

If success, you can see the bunny on your window.Then you can press J and K rotate the bunny.

Usage

Please check out examples/ for more details.

  • Blinn-Phong

Bunny

  • SSAA 8X

spot_ssaa_x8

GitHub

View Github