Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project 3: Tushar Purang #28

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,29 @@ CUDA Path Tracer

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

* (TODO) YOUR NAME HERE
* Tested on: (TODO) Windows 22, i7-2222 @ 2.22GHz 22GB, GTX 222 222MB (Moore 2222 Lab)
* Tushar Purang

### (TODO: Your README)
* [Linkedin](https://www.linkedin.com/in/tpurang/)

*DO NOT* leave the README to the last minute! It is a crucial part of the
project, and we will not be able to grade you without a good README.
* [Portfolio](http://tushvr.com/)

* [Youtube Channel](https://www.youtube.com/channel/UC9ZTxWcJjCSAJDC54dPNbKw?view_as=subscriber)

* Tested on: Windows 10, i7-7700HQ @ 2.80GHz 16GB, GTX 1060 6GB (Personal laptop)


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.

<img src="img\cornell.2021-06-03_08-34-14z.71samp.png" style="zoom:80%;" />



<img src="\img\cornell.2021-06-10_01-26-46z.95samp.png" style="zoom:80%;" />

<img src="\img\cornell.2021-06-10_01-13-06z.90samp.png" style="zoom:80%;" />

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.
Loading