Skip to content
C++ raytracer without any external dependencies
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Raytracer
doc
.gitignore
README.md

README.md

Raytracer

Simple C++ raytracer inspired by Peter Shirley.

3rd party libraries

For a BMP handling, stb_image_write.h is used.

Features

Supported geometry

  • Spheres

Supported material

  • Lambertian
  • Dielectric
  • Metal

Scene

  • Variable size
  • Variable number of the rays per pixel
  • Customizable camera
  • Two predefined scenes for fast usage

Screenshots

Scene 0, 800 x 400, 1000 rays per pixel:

Scene 1, 800 x 400, 1000 rays per pixel:

Scene number is predefined and it can be setup via Scene scene object as follows:

Scene scene(&image); // image to be rendered to

scene.init(&cam, ns); // camera and number of rays per pixel
scene.setupDemoScene(0); // id of the predefined scene
scene.render();
You can’t perform that action at this time.