Skip to content

Not so barebones GPU accelerated raytracer written in OpenCL

Notifications You must be signed in to change notification settings

davawen/Simple-Raytracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple raytracer

A simple ray tracing "engine" written in C++ and OpenCL using boost.compute.

Showcase

The classic raytracing colored wall image

A plain colored sphere, a refractive glass sphere, a metallic sphere and an emissive red sphere

A green refractive Suzanne looking at a mildly metallic Suzanne

Building

This project needs boost and OpenCL to be installed on the system.

$ git clone https://github.com/davawen/Simple-Raytracer
$ meson setup build
$ meson compile -C build

To run the project, just launch the executable:

$ ./build/tracer

Note the you must be in the project's directory to run it, as it reads src/render.cl.

Features

  • Basic shape intersections (plane, sphere, box)
  • Metallic, specular and refractive materials
  • [-] Model loading (.stl and .obj files)
    • Wavefront (.obj) meshes need to be triangulated, and don't support materials
  • Light accumulation (eliminate noise over time)
  • UI and gizmos to place objects

Future plans

  • Acceleration structure (BVH)
  • Texture support
  • Scene saving and loading
  • Denoising

Credits

About

Not so barebones GPU accelerated raytracer written in OpenCL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published