Skip to content

Raytracer written in C++20, using OpenCL for compute and OpenGL + GLFW

Notifications You must be signed in to change notification settings

ChandruSu/opencl-raytracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenCL Ray Tracing Engine

A simple raytracing engine written in C++ using OpenCL for GPU accelerated parallel compute and OpenGL for presentation.

Demo

The following image shows raytracing using distance-functions for simple 3D geometry i.e plane, sphere, ray intersections. This has been extended to create simple shadows and diffuse lighting.

The engine also supports the classical OpenGL rendering pipeline using vertex data loaded from Wavefront (.obj) files and GLSL shaders.

Building

To build the engine source code, the following dependencies must be satisfied and then the make command should be run in a terminal. The source code was written and developed on a 64-bit Windows machine so heavy modification may be required to adapt it for your system.

Dependencies

  • A GPU that supports

    • OpenCL version 3.0 or higher

    • OpenGL version 3.2 or higher

  • NVIDIA GPU Computing Toolkit (Edit the OPENCL path in the CMakeLists.txt file)

  • Download the correct binaries and headers for your system:

    and place them in the include and libs directories in a subdirectory with the name of the library.

  • GNU Make and CMake

  • Visual Studio Build Tools 2022

About

Raytracer written in C++20, using OpenCL for compute and OpenGL + GLFW

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published