Skip to content

YangH34/CUDA-Path-Tracer

 
 

Repository files navigation

CUDA Path Tracer

University of Pennsylvania, CIS 565: GPU Programming and Architecture, Project 3

  • Haorong Yang
  • LinkedIn
  • Tested on: Windows 10 Home, i7-10750H @ 2.60GHz 16GB, GTX 2070 Super Max-Q (Personal)

3D Model Credit: Rồng by @Husky on Sketchfab

Features:

Graphics

  • Bidirectional Scattering Distribution Functions (BSDF): Ideal Diffuse, Specular Reflection, Refraction
  • Physically-based depth-of-field (by jittering rays within an aperture)
  • Stochastic Sampled Antialiasing
  • Arbitrary Mesh loading

Optimization

  • Path termination using stream compaction
  • Sorting pathSegments by material type
  • Acceleration by caching first bounce

Bidirectional Scattering Distribution Functions

Ideal Diffuse Specular Reflection Transmissive (Refraction)

Physically-Based Depth of Field

No Depth of Field With Depth of Field

Stochastic Sampled Antialiasing

No Anti Aliasing With Anti Aliasing

Arbitrary Mesh Loading

Avocado Duck Rồng

3D Model Credit: Khronos Group GLTF Sample Models, Rồng by @Husky on Sketchfab

Optimization

Below is a chart that compares the runtime of 5 iterations when toggling one or both of "sorting by material" and "chaching first bounce" off for rendering scene at the top of this readme.

Sorting the ray/path segments by material type will increase performance by making memory access contiguous hence more efficient; when there are a lot of materials, but not so much when there are limited materials, for example, in the conrell box test scene.

Bloopers

References

About

CUDA based Monte-Carlo Path Tracer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 65.5%
  • Cuda 15.9%
  • CMake 11.2%
  • C 6.7%
  • Makefile 0.7%