RTBVH
A fast BVH library written in Rust. This library contains implementations of the following BVH building algorithms:
- SAH with Spatial splits (Highest quality, slow build times)
- Binned SAH (High quality, decently fast)
- Locally Ordered Clustering Builder (Very fast build times)
All building algorithms make efficient use of multithreading where possible. An MBVH implementation is included as well and all the BVH structures implement traversal algorithms for both single rays and quad rays. This library emits a C/C++ library which is used in my hobby renderer.
Usage
use *;
let vertices: = vec!;
let primitives: = vec!;
let aabbs = primitives.iter.map.;
let builder = Builder ;
// Choose one of these algorithms:
let bvh = builder.clone.construct_locally_ordered_clustered;
let bvh = builder.clone.construct_binned_sah;
let bvh = builder.construct_spatial_sah;
Planning
- Benchmark
- Add support for packets larger than 4
- Increase coverage of API for FFI