Skip to content

An open-source ray tracing framework with OpenGL and C++

License

Notifications You must be signed in to change notification settings

PetoAdam/RayZen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RayZen

License: MIT

RayZen is a modern, open-source GPU-accelerated path tracer written in C++ and OpenGL. It is designed for real-time physically-based rendering (PBR) of 3D scenes, supporting advanced features such as BVH acceleration, dynamic scene support, SSBO caching, debug overlays, and interactive camera controls. RayZen is ideal for graphics research, education, and as a foundation for your own renderer.

Preview


Features

  • Real-Time Path Tracing: Physically-based global illumination using GPU fragment shaders.
  • BVH Acceleration: Fast ray traversal using a Bounding Volume Hierarchy (BLAS/TLAS) for high performance.
  • Dynamic Scene Support: BVH and SSBOs are rebuilt on-the-fly for moving objects.
  • SSBO Caching: BVH and triangle data are cached to disk for fast startup.
  • Physically-Based Materials: Support for metallic, dielectric, rough, and transparent materials.
  • Multiple Light Types: Point and directional lights.
  • OBJ Mesh Loading: Import and render standard OBJ meshes.
  • Interactive Camera: WASD movement and mouse look.
  • Debug Overlays: Toggle light markers, BVH wireframes, and BLAS/TLAS debug modes.
  • Modular C++ Design: Clean, extensible codebase.

Getting Started

Prerequisites

Quick Install (Linux)

Run the provided script to install all dependencies:

bash install_requirements.sh

Build Instructions

git clone https://github.com/PetoAdam/RayZen.git
cd RayZen/RayZen
mkdir build && cd build
cmake ..
make
./RayZen

Controls & Debug

  • WASD: Move camera
  • Mouse Drag (LMB): Rotate camera
  • L: Toggle light debug markers
  • B: Toggle BVH wireframe debug
  • N: Toggle BVH debug mode (TLAS/BLAS)
  • ESC: Exit

Project Structure

  • src/ — C++ source files
  • include/ — C++ headers
  • shaders/ — GLSL shaders
  • meshes/ — Example OBJ meshes
  • docs/ — Documentation

Documentation

  • User & Build Guide: See this README.
  • Technical & Mathematical Details: See docs/TECHNICAL_DETAILS.md for an in-depth explanation of the rendering algorithms, BVH, and system architecture.

Contributing

Contributions are welcome! Please open issues or pull requests for bug fixes, new features, or improvements.


License

This project is licensed under the MIT License. See the LICENSE file for details.

About

An open-source ray tracing framework with OpenGL and C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages