No description
Find a file
2026-05-16 21:31:14 +01:00
.cargo rewriting the whole code to fix problimatic dyn 2026-04-25 21:35:54 +01:00
octree rewriting the whole code to fix problimatic dyn 2026-04-25 21:35:54 +01:00
src switching to vulkan 2026-05-16 21:31:14 +01:00
.gitignore init 2026-04-01 20:55:56 +01:00
.rust-analyzer.toml completed the diffuze material gpgpu and fixed a bunch of bugs 2026-05-03 18:40:54 +01:00
Cargo.lock switching to vulkan 2026-05-16 21:31:14 +01:00
Cargo.toml switching to vulkan 2026-05-16 21:31:14 +01:00
optimized_0.log Add Cargo config for release optimizations and benchmark logs 2026-04-17 17:43:40 +01:00
optimized_2.log Refactor octree to use ArcOct for improved type safety and clarity 2026-04-20 17:48:46 +01:00
optimized_octree_1.log Update elapsed time values in optimized_octree_1.log 2026-04-19 20:14:34 +01:00
readme.md Update readme.md 2026-04-23 17:42:40 +01:00
unoptimized_0.log Add Cargo config for release optimizations and benchmark logs 2026-04-17 17:43:40 +01:00
unoptimized_1.log ``` 2026-04-19 20:13:22 +01:00
unoptimized_2.log Refactor octree to use ArcOct for improved type safety and clarity 2026-04-20 17:48:46 +01:00

rt — CPU Raytracer in Rust

A multithreaded CPU path tracer written in Rust with a real-time windowed preview.

Rendered scene — field of Lambertian, metallic, and dielectric spheres Rendered at commit 47cb9c4

Features

  • Real-time preview via speedy2d — renders progressively into a live window
  • Multithreaded rendering with rayon — saturates all available CPU cores
  • Sphere primitives with analytic ray-sphere intersection
  • Three material types — Lambertian (diffuse), Metal (mirror/glossy), Dielectric (glass with refraction)
  • Global illumination — recursive path tracing with Monte Carlo sampling

Build & Run

git clone https://github.com/MajidAbdelilah/rt
cd rt
cargo run --release

A window will open and the scene will render progressively in real time.

If master doesn't build, check out the stable commit: git checkout 47cb9c4

Roadmap

  • Octree
  • Depth of field (thin-lens camera)
  • Triangle mesh support
  • BVH acceleration structure
  • Scene file loading (JSON/TOML)
  • Progressive accumulation / denoising

Author

Majid Abdelilah — GPU & graphics engineer
GitHub · YouTube