Skip to content

MauroDeryckere/GraphicsProgramming-Raytracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raytracer

A CPU raytracer built with C++20, featuring physically-based rendering with Cook-Torrance materials, soft shadows via area lights, and BVH acceleration.

Table of Contents

Screenshots

Cook-Torrance BRDF

Cook-Torrance PBR materials

Soft Shadows (Area Light)

Soft shadows via triangular area light

BVH Debug Views

BVH AABB wireframe BVH leaf node colors

Features

  • Whitted-style ray tracing on the CPU
  • Parallel rendering with std::execution::par_unseq
  • Cook-Torrance BRDF (GGX distribution, Smith geometry, Fresnel-Schlick)
  • Lambert and Lambert-Phong shading models
  • Soft shadows with area lights (triangular)
  • Progressive rendering with per-frame accumulation
  • Anti-aliasing: random and uniform multi-sampling
  • Triangle mesh rendering with OBJ loading
  • Bounding Volume Hierarchy (BVH) acceleration
  • AABB slab test for ray-box intersection
  • Multiple debug visualization modes: observed area, radiance, BRDF, combined
  • Tone mapping (Reinhard Jodie, ACES approximation)
  • Custom math library (vectors, matrices)

Controls

Camera
WASD: Move
LMB + drag: Rotate

Settings
X: Screenshot
F2: Toggle shadows
F3: Cycle light mode (observed area / radiance / BRDF / combined)
F4: Cycle sample mode (random / uniform)
F5: Decrease samples per frame
F6: Increase samples per frame
F7: Cycle tone mapping (none / Reinhard Jodie / ACES)
F8: Toggle progressive rendering
F9: Toggle BVH acceleration
F10: Cycle BVH debug (off / leaf colors / AABB wireframe)

Scenes
1-9: Switch scene

Building

The project uses CMake.

cmake -S . -B build
cmake --build build

About

Software (CPU) raytracer project. You're able to change render settings at runtime.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages