This repository contains the final project for the Graphics & Visualization (Computer Graphics 2) course at NTNU (spring 2025).
The goal of this project was to implement ray traced reflections and shadows using OpenGL Compute Shaders. The project was inspired by the new Indiana Jones game, specifically to observe ray traced self reflections on a trophy as seen in the game.
- Ray traced reflections and shadows, 1 primary ray + 2 secondary bounces (configurable)
- Shadows via shadow rays toward every light
- Toggleable ray tracing on/off
- Toggleable trophy as a stress‑test
- Fixed camera and free camera modes
- Import and render any model in OBJ format
R- Toggle ray tracing on/offT- Toggle trophy on/off- The trophy has a lot of triangles so it might be slow to render, recommended to hide it for better performance.
C- Toggle between fixed camera and free camera (WASD + arrow keys)ESC- Exit the application
The project requires a GPU that supports OpenGL 4.3 or higher, there's no need for a GPU that supports hardware ray tracing
You can download the latest release GitHub Releases This is the preferred way to get a stable build.
You can also build the project using GitHub Actions. The workflow will build the project and upload an executable as a GitHub Artifact.
You can build the project from source too. The project uses CMake for building, to build and run the project, follow these steps:
- Clone the repository and initialize submodules in the current directory:
git clone --recursive git@github.com:Marko19907/Computer-graphics-2-project.git . - In the project directory, use CMake to generate the build files:
cmake -B build
- Then build the project:
cmake --build build
- The ray tracing is not optimized for performance, it is a basic implementation.
- There's no acceleration structure, every ray is tested against every triangle in the scene.
- No hardware ray tracing is used, only compute shaders.
- Hard shadows only, no soft shadows.
- No textures in the ray traced path, only solid colors.



