Skip to content

A GPU accelerated path tracer implemented in an OpenGL compute shader using a BVH for acceleration

Notifications You must be signed in to change notification settings

Aleksandar204/OpenGL_RT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenGL RT

A simple path tracer implemented in an OpenGL compute shader and C++

The program features both a raster and path traced renderer, a BVH for faster ray traversal and a GUI for quality settings. Most of the engine code for GameObjects and project scenes was taken and expanded upon from my previous project, CoaEngine, but some features are not yet ported over. (See TODO)

The camera is controlled using WASD for movement and Q and E for rotation.

Examples

Dragon test model with a few other objects Sponza test model in the dark with an emmisive cube
Sponza test model in the dark with an emmisive cube

Building

Requirements

  • OpenGL 4.6 capable GPU with support for GL_ARB_bindless_texture
  • CMake >= 3.16
  • C++ 17 capable compiler
  • GLFW, glm and assimp libraries in a place where CMake can find and link them

Compiling (on Linux)

mkdir build && cd build
cmake ..
make

Compiling (on Windows using vcpkg)

Copy the CMakePresets.json file from the Microsoft vcpkg getting started guide and run the following commands:

vcpkg new --application
vcpkg add port assimp
vcpkg add port glm
vcpkg add port glfw3
cmake --preset=default
cmake --build build

TODO

To port from CoaEngine:

  • Lit shader for raster
  • Skybox for raster renderer
  • Transparency

To implement:

  • Refraction and semi transparent materials
  • Normalmapping
  • Emission maps
  • Exporting render to image

Resources and libraries used

About

A GPU accelerated path tracer implemented in an OpenGL compute shader using a BVH for acceleration

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published