A (backwards) raytracer I wrote for learning.
- Using GLM for vector math.
- Using CMake for building and portability.
- Using OpenMP for parallelization.
- Using OneLoneCoder's incredibly helpful olcPixelGameEngine for display.
- Using TinyObjLoader for interpreting .obj and .mtl files.
References used :
- Implement Bounding Volume Hierarchies.
- Parallelize.
- Study PBRT's architecture.
- Implement a smarter parallelization strategy.
- Investigate visual artifacts: Insufficient sampling? Inaccurate normals? Improper texture mapping?
- Use Intel's Open Image Denoiser.
- Real time display for image that's being traced
- BVH
- (Naive) parallelization
- Triangle primitives
- OBJ geometry loading
- (Naive) MTL file loading
There are a few visual artifacts in these images, especially with the teapot normals. However, they do demonstrate geometry mesh loading.
This demonstrates that the current parallelization strategy is not ideal. The top thread finishes its work quickly(since there are no objects to intersect near the sky) and then does nothing, wasting compute. A better solution would be to have a worker-assigner model, where a taskmaster assigns free worker thread an area of the scene to render. As soon as a worker is finished, it indicates this to the taskmaster who can then assign more work.
The red triangle is blurry because of a narrow depth of field.
./premake5.exe vs2019