Skip to content
Another raytracer written in rust
Rust
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
media
src
.gitignore
.travis.yml
Cargo.lock
Cargo.toml
LICENSE
README.md

README.md

rust-raytracer

Build Status

A final project for Stanford's CS248 http://cs248.stanford.edu/winter20.

scene This 1024x1024 image with about 2.3 million triangles was rendered with 16 samples per pixel in about 39 seconds (generating the BVH tree took about 27 seconds) on a 4 core i5-6600K CPU. Thanks to the Stanford Computer Graphics Laboratory for providing these models at https://graphics.stanford.edu/data/3Dscanrep.

Running

Use cargo to build, test, and run the code. For optimal performace, use the release build. The following command will render a basic scene to out.png with size 1024x1024.

#cargo run --release -- <args>
cargo run --release -- -f out.png -w 1024

To print useful timing information, set the environment variable RUST_LOG.

RUST_LOG=debug cargo run --release

Testing

cargo test

TODO

  • Move structs into their own files
  • Lights
    • Ambient
    • Point
    • Cone
    • Directional
  • Shadows
    • Soft shadows
    • Correct shadows from transparent surfaces
  • Objects
    • Sphere
    • Plane
    • Triangle
    • Triangle Meshes
      • BVH
        • Parallelize
  • Materials
    • Flat
    • Phong
    • Reflective
    • Transparent
    • Texture
      • Super sample texture
  • Tracing
    • Anti-aliasing
    • Focus blur
  • Threads
You can’t perform that action at this time.