Skip to content

A simple raytracer written in Rust, based on the "Ray Tracing in One Weekend" book.

License

Notifications You must be signed in to change notification settings

AntoineRR/raytracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

raytracer

This project is a simple ray tracing project written in Rust, based on the Ray Tracing in One Weekend book series. The code was adapted by me from C++ to Rust.

Features

  • Rendering of spheres and 3D models (STL files)
  • 5 different materials : Diffuse, Metal, DiffuseMetal, Dielectric, and DiffuseLight
  • Setting a color for the Skybox
  • Setting up the Camera where you want in the Scene and render a Scene from different Cameras
  • Configuration of the rendering through the Config struct
  • Optimizations: Multithreading and Bounding Volume Hierarchy (BVH)

How to use

Clone this repository, and run cargo run --release in the raytracer directory. Check the src/bin/main.rs file for example scenes to render.

Render examples

Big scene Light Teapot Close up

About

A simple raytracer written in Rust, based on the "Ray Tracing in One Weekend" book.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages