Skip to content

tucna/Raytracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 can be selected via its assigned number 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();

About

C++ raytracer without any external dependencies

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published