Skip to content

C++ based CPU Ray-Tracing renderer following the "Ray Tracing in One Weekend" book, by Peter Shirley

Notifications You must be signed in to change notification settings

Siddharth2077/CPU-Ray-Tracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CPU Ray-Tracer

This project is a C++ implementation of Peter Shirley's Ray Tracing in One Weekend series. It builds a simple CPU-based ray tracer from scratch, showcasing fundamental rendering techniques including ray-sphere intersections, diffuse materials, shadows, reflections, and antialiasing.

Preview

final_render

Final render with 100 samples/pixel

Book Reference

This implementation follows the structure and concepts introduced in:

Features

  • Basic vector and ray math
  • Recursive ray tracing
  • Diffuse, metal, and dielectric materials
  • Antialiasing

Dependencies

  • C++17 or later
  • Standard C++ libraries only (no external dependencies)

Build and Run

Using CMake (Recommended)

git clone https://github.com/Siddharth2077/CPU-Ray-Tracer.git
cd CPU-Ray-Tracer
mkdir build && cd build
cmake ..
cd ..
cmake --build build --config release
.\build\Release\cpu-raytracing-part-i.exe > image.ppm

About

C++ based CPU Ray-Tracing renderer following the "Ray Tracing in One Weekend" book, by Peter Shirley

Topics

Resources

Stars

Watchers

Forks