Skip to content
osguzikPublic

About

A software rasterizer written in C++20

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

131 Commits

Folders and files

Repository files navigation

raster

A software rasterizer written to better understand the inner workings of the GPU and its rendering pipeline.

dragons scene

Features

  • .obj model loading
  • Perspective-correct interpolation
  • Near-plane clipping
  • Blinn-Phong shading
  • UV texture mapping
  • Shadow mapping with PCF
  • Bloom effect

Showcase

Scene Description
depth demo scene Z-buffer with models at varying depth
bunny scene Stanford bunny colored with vertex normals

Usage

Build:

cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build -j

Render a scene:

./build/rasterizer <bunny|depth_demo|dragons> [--frames N]

Convert frames to gif:

pip install -r scripts/requirements.txt
python3 scripts/frames_to_gif.py

Roadmap

  • SIMD optimization (AVX2)

References

Papers

Articles and Tutorials

Documentation

About

A software rasterizer written in C++20

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages