The aim of this project was to learn how a very simple modern renderer works so that I could start building my own. This is by no means finished, and I don't plan to complete it. I am leaving it as a reference for myself, primarily for the rasterization part which can sometimes be confusing. I followed (partially) the amazing tutorial by ssloy.
Renderer
- Vertex and Fragment shaders
- Rasterizer
- Normal Mapping
Here's the list of the libraries included in the project:
- Aseprite TGA Library: Library to read/write Truevision TGA/TARGA files.
- GLM: Mathematics library for graphics software.
- tinyobjloader: Tiny but powerful single file wavefront obj loader.
- cmake >= 3.9.1
- gcc >= 9.4.0
$ git clone --recurse-submodules https://github.com/SaferGo/Simple3dRenderer.git
$ cd Simple3dRenderer/
$ bash run.sh
// img generated in /output
- Fundamental of Computer Graphics (Fourth edition) by Steve Marschner and Peter Shirley. (Chapter 8: The Graphics Pipeline)
- https://www.scratchapixel.com/lessons/3d-basic-rendering/rasterization-practical-implementation/rasterization-stage
- https://www.scratchapixel.com/lessons/3d-basic-rendering/rasterization-practical-implementation/visibility-problem-depth-buffer-depth-interpolation