Simple C++ raytracer inspired by Peter Shirley.
For a BMP
handling, stb_image_write.h is used.
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
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();