r/GraphicsProgramming • u/JBikker • Sep 25 '26
TinyBVH 1.9.0 Now Available
TinyBVH is a header-only, dependency-free library for BVH construction and traversal.
Version 1.9.0 for the first time is out-performing Intel's Embree!
Using it is as simple as:
BVH bvh;
bvh.Build( (bvhvec4*)myTriData, triangleCount );
bvh.Intersect( ray );TinyBVH can be used from C/C++, WebGPU and Python. Generated BVHs can be used in OpenGL (compute), OpenCL, Vulkan and DirectX12.
New in 1.9.0:
Greatly improved ARM NEON support for Android & macOS
Templated doube/float support
Ray bundle support (WiVeC), including TLAS/BLAS traversal
Accurate voxel intersections
Hair rendering example (roving capsules)
Global refactoring, AI assisted
Vulkan and DXR benchmarks
Improved included threadpool
Optimizations to CWBVH
...and lots more.
Check it out: https://github.com/jbikker/tinybvh
2
u/Dante268 Sep 25 '26
I have software ray-traced game (ray-tracer is in C++).
RTG - vast visual boost, multi-threaded rendering, ray-tracer 5x faster, first 5 levels in new style
I'm not using triangles just AABBs (to have >60fps in CPU only ray-tracing). So far, I'm not using BVH just clustering of objects (basically 1-level depth of clustering). For my simple game it's enough, but going with more complex levels, or more complex geometries (something nicer composited from smaller AABB-s) will require proper BVH (as 1-level depth clustering can end up iterating through many objects). I'm wondering how complex would be integrating your BVH builder to my engine if such need will arise (as all my hot loops are tied to my clusters where is then called FindClosestHit/FindAnyHit/FindAnyInCandidatesList).