Skip to content

A work in progress unidirectional pathtracer implementing light transport techniques, for the purpose of rendering complex scenes with physically-based materials.

Notifications You must be signed in to change notification settings

limepixl/pathtracer

Repository files navigation

Pathtracer

This project started as a playground and implementation of light transport theory and concepts in the form of a unidirectional pathtracer. It is currently a Work In Progress, with a lot of features to work on still.

Current list of features:

  • Physically based BRDFs (Lambertian, Oren-Nayar, Specular (GGX))
  • Naive BRDF sampling
  • NEE (Next Event Estimation / Direct light sampling)
  • MIS (Multiple Importance Sampling between Naive and NEE)
  • OpenGL Compute Shader implementation (OpenGL 4.6 Core, GLSL)
  • Custom-made BVH implementations using Sweep SAH split
  • (WIP) glTF model loading and material creation
  • CMake build that supports Windows (MSVC, Clang for Windows) and Linux (GCC, Clang)

Results and renders (From earliest render to current day):

Very early result using a purely Lambertian BRDF and naive hemisphere sampling naive_lambertian

First tests of MIS between Naive and NEE mis

MIS (Naive+NEE), Modified Blinn-Phong, Sweep SAH BVH bvh

Specular BRDF (GGX NDF with Smith geometry func.), using GGX importance sampling - Metallic Gold material specular

(WIP) glTF Model support gltf

Third-party libraries used:

  • cgltf (GitHub)
  • PCG Random Number Generation Library (Minimal C Edition) (GitHub)
  • GLAD - Multi-Language OpenGL Loader-Generator (GitHub)
  • Simple DirectMedia Layer 2 - SDL2 (GitHub)
  • stb libraries (GitHub)
  • glm (GitHub)

To-Do List:

  • Shader includes (Preprocess shaders and copy/paste included shaders)
  • Optimize BVH traversal
  • Multiscattering approximation for Oren-Nayar BRDF
  • Separate different estimators (BRDF-only, NEE-only, MIS) into different compute shaders
  • Implement more variance reduction techniques (stratified sampling, BRDF sampling, low discrepancy sequences).
  • Russian Roulette
  • Measuring different radiometric quantities (for example intensity, to get an orthographic projection)

About

A work in progress unidirectional pathtracer implementing light transport techniques, for the purpose of rendering complex scenes with physically-based materials.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published