Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 1.39 KB

README.md

File metadata and controls

50 lines (34 loc) · 1.39 KB

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