My attempt at writing a ray tracer from scratch optimised to run on the CPU only. Also with the help from the book ()
Important to note that in its current state it can only display graphics on Windows and Linux. Some modication to the code might be needed to get graphics working on Mac.
- On Linux:
-lX11 - On Windows:
-luser32 -lgdi32
g++ -g main.cpp -m64 -Ofast -march=native -mtune=native -flto -pipe -ffast-math -funsafe-math-optimizations (libraries for your system)
Place your .obj model along with any .mtl files in the models folder. Update main in main.cpp to load your file. Depending on your model changing the settings in Settings.hpp may increase performance. To move the camera in the scene it is wasd, e and q for rotation and v and space for vertical movement.
Covers the main features of each new version.
- Utilizes BVH (bounding volume heirachy) to massivly reduce the number of face intersection tests.
- Use of fibinacci latice for uniform sampling, provides less nose for fewer samples compared to random sampling
- Combining triangles into quadralaterals where possible, to reduce the number of faces and improve performance
- Importance sampling to reduce noise
- Improoved use of SIMD instructions / other optimization
- Addition of glass and volumentrics

