A GPU path tracer in C++/OpenCL.
Note the following:
- Reflected green light from the wall (wall not in view)
- Interpolated smooth shading across the surface of the teapot (you can still see the low resolution of the model by looking at the jagged silhouette)
- Depth of field / blurred background (easily visible if you look where the walls meet or at the handle of the teapot)
Device: AMD Radeon RX 570
Triangles: 1,006
Render time: 4 minutes 49 seconds
Image size: 600x600
Samples per pixel: 4096
Max ray depth: 8 bounces
*Note: output was in .ppm, converted to .jpeg to display here
- High levels of parallelism using GPU
- Direct and indirect lighting (global illumination)
- Triangle primitives (polygon primitives also supported through Assimp importer)
- Loading triangle meshes from external files
- Multiple objects in scene
- Transformation using translation, rotation, scale
- Physically based camera model with adjustable vFOV, focus distance, defocus blur (depth of field)
- Bounding Volume Heirarchy (BVH) acceleration structure
- Automatic construction on CPU
- Stack-based traversal on GPU
- Various materials
- Diffuse
- Metal
- Glass
- Area lights
- Smooth shading / soft shadows
- Adjustable samples per pixel for anti-aliasing and decreased noise
- Image output to .ppm
Planned features include:
- Build system
- Scene description format (so different scenes can be rendered without modifying code)
- Textures
- HDR
- Tone mapping
- Surface Area Heuristic (SAH) BVH construction
