ErwanDL / cpp-raytracer

Implementation of a raytracing renderer in C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Raytracing in C++

This is a personal project in which I incrementally build a raytracer, that I started to learn modern C++ and computer graphics. Going back at it from time to time !

Example image

Running the project

  • Requirements : CMake, Make, a modern C++ compiler (tested with G++ >= 9), OpenMP library (for multithreading).
  • Generate the Makefile by doing :
    $ mkdir build
    $ cd build
    $ cmake ..
  • You can then compile and run the project with :
    $ make raytracer
    $ ./raytracer

If you want to change the rendered scene, you can do so in src/main.cpp.

Features supported

  • Global illumination via path tracing
  • Area lights
  • PBR material (inspired by Disney's & Blender's Principled Material although much less complete) supporting diffuse, metal, refractive and emissive
  • Multithreading (using OpenMP)
  • Importance sampling (for diffuse BRDF and area light sampling)
  • Firefly removal

About

Implementation of a raytracing renderer in C++

License:MIT License


Languages

Language:C++ 99.8%Language:CMake 0.2%