Skip to content

Latest commit

 

History

History
66 lines (47 loc) · 1.98 KB

README.md

File metadata and controls

66 lines (47 loc) · 1.98 KB

ray-tracing-weekend

Ray tracing in one weekend, but it is in Rust. This will not finish in a single weekend.

Image will many spheres of different materials and sizes scattered on a seemingly flat plane

Features

Base Features

The features that all projects that are based on ray tracing in one weekend are:

  • Rendering of spheres
  • Rendering of reflections and shadows
  • Rendering of refraction
  • Rendering of different materials
    • lambertian
    • metals
    • dielectrics
  • Rendering the scene from different camera positions
  • Rendering different camera field of view
  • Rendering depth of field

Differences

Instead of using an existing rust library that would implement the vector operations required, I implemented those vectors myself to learn how you would do so in rust.

These implementation have brief unit tests.

The base program will also use rayon by default, since it give substantial performance boost for little work.

Running the program

Currently the program will just spit out ppm format image into the terminal. If you actually wish to view the image, please pipe the output into a file.

Example of piping the output into a file

Here is an example of how to run the program, and save it to a file called image.ppm.

cargo run > image.ppm

Tasks

  • Add Lambertian Reflection
  • Allow materials to be colored
  • Add new materials
    • Add metals
    • Add fuzzy metals
    • Add glass metals
  • Make the camera adjustable
  • Add a defocused effect
  • Make a threaded computation mode
  • Make a wgpu mode
  • Add a command line interface

Resources