Skip to content

Sachinkry/tinyrenderer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TinyRenderer

A minimal software rasterizer in C++

Features

  • Supports flat, Gouraud, and Phong shading
  • Loads .obj models and .tga textures
  • Outputs rendered images

Sample Outputs

Wireframes:

Here are some sample outputs demonstrating different shading techniques:

Flat Shading Gouraud Shading Phong Shading

Diablo3 Character:

  1. Clone the repository:

    git clone https://github.com/Sachinkry/tinyrenderer.git
    cd tinyrenderer
    
  2. Build the project using CMake:

    mkdir build
    cd build
    cmake ..
    make
    
  3. Run the executable:

    ./main
    

Dependencies

  • A C++ compiler with C++17 support (e.g., g++)
  • CMake (version 3.10 or higher)

Notes

  • The rendered images are saved in the assets/outputs directory.
  • The .vscode directory and the main executable are ignored by Git (see .gitignore).
 g++ -std=c++17 -ggdb -g -pg -O0 -Iinclude -o main src/main.cpp src/tgaimage.cpp src/model.cpp src/shaders.cpp
./main

About

A tiny 3d renderer in C++ to understand how openGL works

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published