Skip to main content
Featured image for project: Simple RayTracer

Simple RayTracer

Completed
ComputerGraphics C++ GLM

Project Overview

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

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

alt

  • MSAA

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

  • Diffuse Material

alt

  • Dielectric Material

alt

  • Metal Material

alt

  • DoF

alt
VFO: 30, ApertureSize: 0.3

Environment

  • Linux.
  • C++17
  • GLM

Prerequisites

  • g++
  • CMake >= 3.9.1

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.