Soft Renderer is a cross-platform implementation of the GPU rendering pipeline on CPU.
- Support multiple platforms, Windows, Linux, and macOS.
- Model Loading: Supports load
.obj
model file and.jpg
,.png
texture resources. - Vertex Processing: Vertex Shader, Clipping, Perspective Division, Backface Culling.
- Rasterization: Rasterize triangles based on barycentric coordinates with perspective correction.
- Pixel Shading: Implements the Phong reflection model, including ambient light, diffuse reflection, and specular reflection.
- Texture Filtering: Supports Bi-Linear texture filtering.
Platform | Clang | GCC | MSVC |
---|---|---|---|
Windows | ✔️ | N/A | ✔️ |
Linux(Ubuntu) | ✔️ | ✔️ | N/A |
macOS | ✔️ | N/A | N/A |
before build the project, you need to install
- C++17 capable compiler
- CMake 3.10(or later)
then
- Clone the project.
git clone https://github.com/hanyangl5/soft-renderer.git
- Generate project using cmake
cmake . -B build -G <generator>
- build
Rasterizer
and run
MIT © hanyangl5