/draw

cpu-based real-time renderer from scratch

Primary LanguageRust

draw

real-time renderer from scratch

description

A CPU-based real-time renderer built from the ground up in Rust, this project explores the core concepts of graphics programming by implementing essential rendering techniques without relying on external graphics APIs. The renderer supports triangle rasterization, perspective projection, Phong shading, and texture mapping, all rendered directly to the frame buffer using the X11 API. This project is designed to be both a hands-on learning experience and a strong foundation for further exploration into efficient software rendering techniques.

dependencies

install the latest version of rust and:

$ sudo apt install libx11-dev libxi-dev libxfixes-dev libxcursor-dev

build and run

$ git clone https://github.com/mororo18/draw.git
$ cd draw
$ cargo run --release

screenshot

alt text

todo

  • perspective projection
  • triangle clipping
  • camera movement by mouse input
  • phong shading
  • texture mapping
  • wavefront .obj fileformat
  • normal mapping
  • decent user interface :(
  • anti-alising
  • vertical synchronization