University of Pennsylvania, CIS 565: GPU Programming and Architecture, Project 3
- Haorong Yang
- 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
- 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
- Path termination using stream compaction
- Sorting pathSegments by material type
- Acceleration by caching first bounce
| Ideal Diffuse | Specular Reflection | Transmissive (Refraction) |
|---|---|---|
![]() |
![]() |
![]() |
| No Depth of Field | With Depth of Field |
|---|---|
![]() |
![]() |
| No Anti Aliasing | With Anti Aliasing |
|---|---|
| Avocado | Duck | Rồng |
|---|---|---|
![]() |
![]() |
![]() |
3D Model Credit: Khronos Group GLTF Sample Models, Rồng by @Husky on Sketchfab
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.
- [PBRT] Physically Based Rendering, Second Edition: From Theory To Implementation. Pharr, Matt and Humphreys, Greg. 2010.
- CIS565 Slides
- https://learnopengl.com/PBR/Theory
- https://raytracing.github.io/books/RayTracingInOneWeekend.html#dielectrics/refraction
- http://wwwx.cs.unc.edu/~rademach/xroads-RT/RTarticle.html#:~:text=Its%20color%20is%20given%20by,way%20out%20into%20the%20scene.











