This Ray Tracer Renderer provides the ability to move freely in the scene with the keyboard and mouse, while
streaming live the results from the GPU to the screen.
Table of Contents
This project is a ray tracer / path tracer visualizer that provides a way to move freely in the scene with the keyboard and mouse similar to a free camera in a world. The tracing algorithm is calculated on the GPU using the CUDA C++ toolkit. The program is written mainly in C++20 and CUDA-C++17 and built with cmake. To present the result in realtime, I used OpenGL with glfw, glew to have a windowed program and also ImGui to have a simple UI.
- Make sure you have the CUDA toolkit installed and have NVIDIA nvcc compiler installed.
- Have cmake 3.8+ installed.
- Clone the repo
git clone https://github.com/Sahar-E/Raytracer.git raytracer
- cd raytracer && mkdir build && cd build
- cmake ..
- cmake --build .
Launch the application executable. To move the camera, use the following keybindings:
- W - move the camera forward.
- S - move the camera backward.
- D - move the camera right.
- A - move the camera left.
- SPACE - move the camera up.
- SHIFT+SPACE - move the camera down.
- MOUSE_PRESS_LEFT + MOUSE_MOVEMENT - pan the camera according to the mouse movements.
Example video for Real Time raytracing:
Screenshot of the program:
Screenshot of the save from the video:
Last rendered image: