1 comment

[ 3.2 ms ] story [ 15.7 ms ] thread
Last week I released on github a new single-header file library for constructing and traversing BVHs on the CPU, with (short-term) plans to take traversal (not construction) to the GPU as well.

Features:

* No dependencies at all. Just add the header to your project and it works. * Simple interface. Build using a flat array of triangle vertices. * Builds state-of-the-art SAH binned BVH using AVX - 34ms for 260k triangles. * Or, ~250ms for the same data without AVX, for cross-platform purposes. * Builds wide BVHs: 4-wide and 8-wide, also in GPU-friendly format. * BVH refitting. * BVH optimizing: post-process your static scene BVH for ~15% more speed. * Comparison against Embree is included (not winning yet but closing in).

Coming up:

* CWBVH for billions of rays/second on the GPU. * OpenCL examples. * TLAS/BLAS traversal.

The code is an implementation and continuation of my articles on BVH construction.

https://jacco.ompf2.com/2022/04/13/how-to-build-a-bvh-part-1...

Support / questions:

jbikker.bsky.social j_bikker on X.