Skip to content

A simple C++ ray tracing engine featuring spheres, lighting, reflections, BVH acceleration, antialiasing, and multithreading for fast and realistic rendering.

Notifications You must be signed in to change notification settings

devalexxx/Raytracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raytracer

A C++ ray tracing engine designed for learning and experimentation. The project implements advanced techniques such as BVH (Bounding Volume Hierarchy), antialiasing, multithreading, and benchmarking.

room.png

Features

  • Basic ray tracing: photorealistic rendering with reflection, refraction, and shading.
  • BVH acceleration: binary volume hierarchy for performance optimization.
  • Antialiasing: multiple sampling for smoother visuals.
  • Multithreading: utilizes multiple CPU cores for faster rendering.

Prerequisites

  • C++23
  • xmake for building the project

Installation

Clone the repository and build the project:

  git clone https://github.com/devalexxx/Raytracer.git
  cd Raytracer
  xmake

Usage

Run the program with:

  xmake run

Rendered images will be saved in the (buildir)/ directory.

Benchmark

  • n spheres
  • 3 lights

All benchmark times are cumulative:

  • Antialiasing includes BVH
  • Multithreading includes Antialiasing & BVH
n RAW (ms) BVH (ms) AntiAliasing (10) MultiThread
8 36 8 118 433
64 181 15 179 444
1000 2523 57 533 490
8000 20192 150 1290 560
64K 427 3658 816
1M 2258 2668
8M 6685 6746

About

A simple C++ ray tracing engine featuring spheres, lighting, reflections, BVH acceleration, antialiasing, and multithreading for fast and realistic rendering.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published