{"id":33938619,"url":"https://github.com/meirbon/rtbvh","last_synced_at":"2026-04-08T13:31:19.338Z","repository":{"id":52286228,"uuid":"268241817","full_name":"meirbon/rtbvh","owner":"meirbon","description":"BVH library for Rust","archived":false,"fork":false,"pushed_at":"2021-07-06T21:31:41.000Z","size":452,"stargazers_count":16,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-14T03:12:13.502Z","etag":null,"topics":["acceleration","bvh","c","cpp","ffi","ray","rust","structure","tracing"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meirbon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-31T08:47:04.000Z","updated_at":"2025-03-01T01:45:47.000Z","dependencies_parsed_at":"2022-09-07T04:41:44.547Z","dependency_job_id":null,"html_url":"https://github.com/meirbon/rtbvh","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/meirbon/rtbvh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meirbon%2Frtbvh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meirbon%2Frtbvh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meirbon%2Frtbvh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meirbon%2Frtbvh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meirbon","download_url":"https://codeload.github.com/meirbon/rtbvh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meirbon%2Frtbvh/sbom","scorecard":{"id":635539,"data":{"date":"2025-08-11","repo":{"name":"github.com/meirbon/rtbvh","commit":"607a2056d7173868d7c5da4abe81fc602297817d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/rust.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rust.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/meirbon/rtbvh/rust.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rust.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/meirbon/rtbvh/rust.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rust.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/meirbon/rtbvh/rust.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rust.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/meirbon/rtbvh/rust.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rust.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/meirbon/rtbvh/rust.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rust.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/meirbon/rtbvh/rust.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rust.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/meirbon/rtbvh/rust.yml/main?enable=pin","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-21T09:03:53.715Z","repository_id":52286228,"created_at":"2025-08-21T09:03:53.715Z","updated_at":"2025-08-21T09:03:53.715Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31558380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acceleration","bvh","c","cpp","ffi","ray","rust","structure","tracing"],"created_at":"2025-12-12T15:02:55.847Z","updated_at":"2026-04-08T13:31:19.326Z","avatar_url":"https://github.com/meirbon.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/MeirBon/rtbvh/actions/workflows/rust.yml/badge.svg)](https://github.com/MeirBon/rtbvh/actions/workflows/rust.yml)\n[![crates.io](https://img.shields.io/crates/v/rtbvh.svg)](https://crates.io/crates/rtbvh)\n\nhttps://github.com/MeirBon/rtbvh/actions/workflows/rust.yml/badge.svg\n\n# RTBVH\nA fast BVH library written in Rust. This library contains implementations of the following BVH building algorithms:\n- SAH with Spatial splits (Highest quality, slow build times)\n- Binned SAH (High quality, decently fast)\n- Locally Ordered Clustering Builder (Very fast build times)\n\nAll building algorithms make efficient use of multithreading where possible.\nAn MBVH implementation is included as well and all the BVH structures implement traversal algorithms for both single rays and quad rays.\nThis library emits a C/C++ library which is used in my [hobby renderer](https://github.com/meirbon/rendering-fw).\n\n## Performance\nIn a scene with a teapot of ~6300 triangles, an AMD 16-core 5950x achieves the following performance:\n```\nBvh construction with spatial sah type of 6320 primitives took 25.171 ms\nSingle-threaded rays: 100000000 rays in 22446.148 ms, 4.455107 million rays per second\n32 threads rays: 100000000 rays in 1384.02 ms, 72.25329 million rays per second\nSingle-threaded packets: 100000000 rays in 6407.564 ms, 15.606555 million rays per second\n32 threads packets: 100000000 rays in 377.237 ms, 265.08536 million rays per second\n\nMbvh construction took 1.341 ms\nSingle-threaded rays: 100000000 rays in 17492.605 ms, 5.7167015 million rays per second\n32 threads rays: 100000000 rays in 829.837 ms, 120.5056 million rays per second\nSingle-threaded packets: 100000000 rays in 5456.565 ms, 18.326548 million rays per second\n32 threads packets: 100000000 rays in 287.798 ms, 347.4659 million rays per second\n\nBvh construction with binned sah type of 6320 primitives took 3.81 ms\nSingle-threaded rays: 100000000 rays in 21255.336 ms, 4.704701 million rays per second\n32 threads rays: 100000000 rays in 1292.286 ms, 77.38225 million rays per second\nSingle-threaded packets: 100000000 rays in 6052.331 ms, 16.52256 million rays per second\n32 threads packets: 100000000 rays in 353.105 ms, 283.20187 million rays per second\n\nMbvh construction took 1.156 ms\nSingle-threaded rays: 100000000 rays in 16748.16 ms, 5.970805 million rays per second\n32 threads rays: 100000000 rays in 797.133 ms, 125.44958 million rays per second\nSingle-threaded packets: 100000000 rays in 5180.24 ms, 19.304125 million rays per second\n32 threads packets: 100000000 rays in 271.036 ms, 368.95465 million rays per second\n\n\nbvh-0.5 of 6320 primitives construction took 10.832 ms\nSingle-threaded rays: 100000000 rays  in 30220.916 ms, 3.3089666 million rays per second\n32 threads rays: 100000000 rays in 2153.541 ms, 46.43515 million rays per second\n```\n\n## Usage\n\n```rust\nuse rtbvh::*;\nuse glam::*;\n\n#[derive(Debug, Copy, Clone)]\nstruct Triangle {\n    vertex0: Vec3,\n    vertex1: Vec3,\n    vertex2: Vec3,\n}\n\nimpl Primitive for Triangle {\n    fn center(\u0026self) -\u003e Vec3 {\n        (self.vertex0 + self.vertex1 + self.vertex2) / 3.0\n    }\n\n    fn aabb(\u0026self) -\u003e Aabb {\n        let mut aabb = Aabb::new();\n        aabb.grow(self.vertex0);\n        aabb.grow(self.vertex1);\n        aabb.grow(self.vertex2);\n        aabb\n    }\n}\n\nimpl SpatialTriangle for Triangle {\n    fn vertex0(\u0026self) -\u003e Vec3 {\n        self.vertex0\n    }\n\n    fn vertex1(\u0026self) -\u003e Vec3 {\n        self.vertex1\n    }\n\n    fn vertex2(\u0026self) -\u003e Vec3 {\n        self.vertex2\n    }\n}\n\nlet vertices: Vec\u003cVec3\u003e = vec![\n    vec3(-1.0, -1.0, 0.0),\n    vec3(1.0, -1.0, 0.0),\n    vec3(1.0, 1.0, 0.0),\n    vec3(-1.0, 1.0, 0.0),\n];\n\nlet primitives: Vec\u003cTriangle\u003e = vec![\n    Triangle {\n        vertex0: vertices[0],\n        vertex1: vertices[1],\n        vertex2: vertices[2],\n    },\n    Triangle {\n        vertex0: vertices[0],\n        vertex1: vertices[2],\n        vertex2: vertices[3],\n    },\n];\n\nlet aabbs = primitives.iter().map(|t| t.aabb()).collect::\u003cVec\u003cAabb\u003e\u003e();\n\nlet builder = Builder {\n    aabbs: aabbs.as_slice(),\n    primitives: primitives.as_slice(),\n};\n\n// Choose one of these algorithms:\nlet bvh = builder.clone().construct_locally_ordered_clustered();\nlet bvh = builder.clone().construct_binned_sah();\nlet bvh = builder.construct_spatial_sah();\n```\n\n# Planning\n- Benchmark\n- Add support for packets larger than 4\n- Increase coverage of API for FFI\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeirbon%2Frtbvh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeirbon%2Frtbvh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeirbon%2Frtbvh/lists"}