Skip to content

marko176/PathTracing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A physically based offline CPU pathtracer written in C++20

Screenshots

San Miguel - Rendered with 1024 SPP, 128 bounces san_miguel

REQUIREMENTS

  • C++20 compiler
  • Cmake 3.22+ for building

Build

  1. Cloning the project with submodules:
git clone --recurse-submodules https://github.com/marko176/PathTracing.git
  1. Building the project:
cd PathTracing
mkdir build
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build ./build --config Release -j N   (set N to thread count)
  1. Running the pathtracer do: ./Release/PathTracer

Output images will be stored in: Output/

Features:

  • Camera with field of view and thin-lens approximation

  • BVH2 using SAH-based binned building and simd during traversal and BVH4 based on BVH4, split into:

    • TLAS (Top-Level Acceleration Structure)
    • BLAS (Bottom-Level Acceleration Structure)
  • Model Loading with Assimp

    • Supports obj and gltf formats
    • Supports model serialization for faster reloads in assbin format
  • Physically Based Materials

    • Microfacet Dielectric
    • Microfacet Diffuse
    • Specular Dielectric
    • Specular Conductor
  • Volumetric Rendering

    • Supports participating media (homogeneous)
    • Handles volumetric scattering and absorption within the path tracer
    • Works with MIS and NEE for efficient light transport through media
  • Sampling

    • Cosine-weighted importance sampling for Lambertian BRDF
    • VNDF (visible normal distribution function) importance sampling for GGX specular BRDF
    • Multiple Importance Sampling (MIS) with Next Event Estimation (NEE) weighted with the power heuristic Veach (1997)
    • Russian Roulette path termination
  • Texture Mapping

    • Albedo, Normal, Roughness, Metallic, Alpha, Emissive
    • support for HDR textures

Dependencies

About

A Pathtracer written in C++ supporting PBR materials

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published