Skip to content

SaferGo/SimpleRayTracer

Repository files navigation

Simple Ray Tracer

+ Hey there! 

This is my implementation of a simple Ray Tracer. There is a lot of space for more features but the purpose of this project was to make my first steps in a Ray Tracer and to leave a base-template to create a more complex one in the future.

Preview

Features

  • Movable Camera.

  • MSAA (Multisampling Antialiasing).

  • Materials: Dielectric, Diffuse and Metal.

  • Surface: Sphere.

  • Depth of field.

  • Output file format: PPM

  • All the parameters of the features can be changed in the config.h file.

Preview of the features

Movable Camera

MSAA

Left image without MSAA - Right image with MSAA(# of samples = 100)

Diffuse Material

Dielectric Material

Metal Material

DOF

VFO: 30, Aperture Size: 0.3

Environment

  • Linux
  • C++ 17
  • GLM

Prerequisites

  • g++
  • CMake >= 3.91

Documentation

How to run it

$ git clone https://github.com/SaferGo/Simple-Ray-Tracer.git
$ cd Simple-Ray-Tracer
$ bash run.sh
You can find the img file in the output folder.