University of Pennsylvania, CIS 565: GPU Programming and Architecture, Project 3
- Zirui Zang
- Tested on: Windows 10, AMD Ryzen 7 3700X @ 3.60GHz 32GB, RTX2070 SUPER 8GB (Personal)
In real life, rays come from light source, bounce between object surfaces before entering our eyes. Each bounce off an object surface carries information of that surface. In ray-tracing rendering, we can start from the eye (image plane), trace backwards through each pixel to the world and eventually to the light source. Such ray-tracing is repeated thousands of times and color information is averaged to give photorealistic effects.
Below list the 3 separate scattering surfaces implemented in this renderer. To make refracgive surface seen more realistic, schlicks approximation is used to make the surface the effect of Frenel reflections. Objects in the seen can use a combination of these 3 properties based on the bidirectional scattering distribution function (BSDF) of the surface.
Lambertian | Reflective | Refractive | with Color |
---|---|---|---|
Depth of Field is created by sampling with a non-zero aperture size.
Close Focus | Far Focus |
---|---|
Anti-Aliasing is implemented by sub-pixel sampling.
with Anti-Aliasing | without Anti-Aliasing |
---|---|
- .obj Mesh Import
- Toggleable option to cache the first bounce intersections for re-use across all subsequent iterations, when not using anti-aliasing. Is is not used because AA is a must.
- Elimiating terminated rays with Stream Compaction. This method definitely reduces empty thread launches and improves performance.
- Efficient attempt to sort the ray by the material type before shading. No efficient improvement is seen with this method.