Skip to content

3D rendering engine written in Rust based on Ray Tracing and Physically Based Rendering. Partially supports rendering glTF scenes.

Notifications You must be signed in to change notification settings

Safarte/rust-ray-tracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Ray Tracer

A simple 3D rendering engine written in Rust, inspired by the series of books: "Ray Tracing In One Weekend" by Peter Shirley and by the excellent guides on scratchapixel.com. This engine is able to render 3D scenes using Sphere, Cuboid, Triangle and Mesh primitives combined with Lambertian, Metallic, Dielectric or Emissive materials.

Usage

You first need to build the project using cargo build --release, you will then be able to run the executable located in the target/release/ folder.

The arguments needed to run the program are defined as follows:

USAGE:
    rust-ray-tracer [OPTIONS] <HEIGHT> <SAMPLES>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -a, --aspect_ratio <FLOAT>     Sets the camera aspect ratio
    -g, --gltf <FILE>              Sets the input glTF scene file
    -o, --output <FILE>            Sets the output image file name
    -t, --threads <NUM_THREADS>    Sets the desired number of threads

ARGS:
    <HEIGHT>     Sets the image height
    <SAMPLES>    Sets the number of samples per pixel

By default the program will use all CPU cores to perform the rendering task.

About

3D rendering engine written in Rust based on Ray Tracing and Physically Based Rendering. Partially supports rendering glTF scenes.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages