-
Notifications
You must be signed in to change notification settings - Fork 0
Libraries
Here are the third-party libraries used in Dogeray 2:
- CUDA for GPU computing
- SDL2 for GUI backend and windows
- Imgui for user interface
- Linalg for processing GLTF transformations
- Tinygltf for opening GLTF 2.0 files
- STB_image and STB_image_write for tinyGLTF and saving images.
Licenses for these libraries are included in their folders.
I picked CUDA because it allows me to do as much as possible myself. This is better for learning and more fun. Since CUDA is general-purpose, I am simply writing code on the GPU rather than having to deal with library shenanigans. CUDA is also very fast and fun to work with. I chose Cuda over OpenCl because CUDA allows me to use neat object-oriented C++ on the GPU side while Opencl only supports runtime compiled c. Lots of people use OpenGL shaders, I did not use this since I did not want to deal with Opengl buffers and GLSL. I also did not go with a ray tracing specific graphics library such as Optix, DXR, or Vulkan ray tracing, since like I mentioned earlier it is more fun to do it yourself, although these generally provide the maximum performance possible.
Imgui is amazing! It is super great to work with. Since it updates things every frame and allows you to control your main loop, I was able to do multithreading very easily. Making responsive UI is also as simple as adding if statements! Because it is a toolkit, rather than a framework, it is very lightweight and can easily be wrapped in a class and added to your projects. This is way better than some heavy framework that requires you to build your entire software around it. Imgui also supports lots of backends, including trusty SDL2 which I had already added to my project before the user interface. This also means that I don't have to use OpenGL for windows, making my project 100% Opengl free.