Skip to content

tblut/Path-Tracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Path-Tracer

This is a CPU-only, unidirectional path tracer. Most of the shading code is unoptimized for the sake of clarity and debugging.

Render

Features

  • Unidirectional path tracer with importance sampling and russian roulette
  • Next event estimation (direct light sampling)
  • Multiple importance sampling for next event estimation
  • Physically-based BSDF based on the Disney BSDF
  • Area lights
  • Thin lense camera model
  • Multithreaded rendering with tiles
  • Spheres and triangle meshes
  • Bounding volume hierarchy (BVH) with SAH
  • JSON scene description file
  • Unit tests for most things incl. chi-square tests for BxDF sampling, and (weak) white furnace tests for BxDFs

Thing I want to add in the future

  • Volume rendering
  • The full Disney BSSDRF
  • Better sampling (e.g. blue noise)
  • Directional lights (for e.g. sun light)

Some useful resources I used

Library licenses

  • std_image_write.h : v1.15 - public domain image writer - GitHub link
  • catch.hpp : v2.13.3 - BSL-1.0 License - GitHub link
  • json.hpp : v3.9.1 - MIT License - GitHub link
  • tiny_obj_loader.h : v1.0.6 - MIT License - GitHub link