A C++ ray tracing engine designed for learning and experimentation. The project implements advanced techniques such as BVH (Bounding Volume Hierarchy), antialiasing, multithreading, and benchmarking.
- Basic ray tracing: photorealistic rendering with reflection, refraction, and shading.
- BVH acceleration: binary volume hierarchy for performance optimization.
- Antialiasing: multiple sampling for smoother visuals.
- Multithreading: utilizes multiple CPU cores for faster rendering.
- C++23
- xmake for building the project
Clone the repository and build the project:
git clone https://github.com/devalexxx/Raytracer.git
cd Raytracer
xmake
Usage
Run the program with:
xmake run
Rendered images will be saved in the (buildir)/ directory.
- n spheres
- 3 lights
All benchmark times are cumulative:
Antialiasing
includes BVHMultithreading
includes Antialiasing & BVH
n | RAW (ms) | BVH (ms) | AntiAliasing (10) | MultiThread |
---|---|---|---|---|
8 | 36 | 8 | 118 | 433 |
64 | 181 | 15 | 179 | 444 |
1000 | 2523 | 57 | 533 | 490 |
8000 | 20192 | 150 | 1290 | 560 |
64K | 427 | 3658 | 816 | |
1M | 2258 | 2668 | ||
8M | 6685 | 6746 |