Skip to content

dalev/path-tracer-ocaml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple quasi-Monte-Carlo path tracer as described by Peter Shirley's Ray Tracing articles. For quasi-random sampling, I use the low-discrepancy sequence described here by Martin Roberts.

Our rendering of Shirley's test scene at 32 samples per pixel

It's implemented in Ocaml and a little bit of Rust. It requires Ocaml version 5 because it uses the new shared-memory parallelism capabilities. On x86-64, the rust code uses AVX intrinsics to intersect a ray with four spheres at a time.

To build, run dune build --release. To generate the above image, run dune exec --release shirley_spheres -- --dimension=600,300 --samples-per-pixel=32 --max-ray-bounces=8. Increase --samples-per-pixel and/or --max-ray-bounces to render a higher quality image. Pass the --help flag to see other options.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published