Skip to content

CloudCodingSpace/RayTracer

Folders and files

NameName
Last commit message
Last commit date
Feb 28, 2025
Mar 27, 2025
Mar 17, 2025
Mar 27, 2025
Mar 27, 2025
Mar 17, 2025
Mar 17, 2025
Feb 28, 2025
Mar 24, 2025

Repository files navigation

RayTracer

RayTracer, this project is about me (@CloudCodingSpace), creating a real-time raytracer pretty much from scratch with very less number of dependencies. The prefferred language of choice is indeed C++. And the graphics API is OpenGL.

Build

First you need to clone this repository using this command on your terminal or powershell :-

git clone --recursive https://github.com/CloudCodingSpace/RayTracer

Then simply run these commands on your terminal :-

mkdir bin
cd bin  
cmake ..  
cmake --build . --parallel

When you are finally done with building the project, then find your executable and run it. When you run the executable, then it will open a window and render the scene in real-time.

Dependencies

This project uses a couple of dependencies. Namely :-

  • GLM
  • TinyOBJLoader
  • ImGUI
  • GLFW
  • GLAD

Features

  • Can render a hdri panorama/equirectangular image as a skybox
  • Can select the hdri panorama/equirectangular image during runtime
  • Can save the scene as an png image, found at output/img.png that is present in the same folder as the RayTracer executable.
  • Can render multiple spheres
  • Can add spheres during runtime
  • Can change the sphere properties during runtime through ImGui
  • Can do some reflection and the number of bounces per ray can be controlled through the ImGui Settings panel
  • The ImGui window can be dragged out of the parent window by the ImGui viewports feature