Skip to content

tusadi/Project3-CUDA-Path-Tracer

 
 

Repository files navigation

CUDA Path Tracer

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

I have implemented a path tracer for this project. I also implemented a BSDF-kernel based shader that shades rays depending on the surfaces that it hits.If an object is specular then a specular reflection and scattering is done based on the probability set in the shader.

Diffuse surfaces use cos-weghted scatering function to generate rays in random direction. Stream compaction is implimented using partitioning function in thrust library to eliminate terminated rays.

Here are some renders showcasing some of these main features that I have added.

I implemented first-bounce caching for the first part of the project. Sorting intersections based on materials before shading also optimized the program. Its effectiveness stems from the fact that GPU can be efficiently utilized because of less branching since adjacent paths are generally of the same material. For this path tracer, sorting resulted in performance drop since most of the materials are same and sorting was redundant.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 50.8%
  • Cuda 19.3%
  • CMake 15.1%
  • C 13.9%
  • Makefile 0.9%