Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/weakknight/cpurt
https://github.com/weakknight/cpurt
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/weakknight/cpurt
- Owner: WeakKnight
- License: mit
- Created: 2023-09-27T12:37:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-11T02:55:09.000Z (7 months ago)
- Last Synced: 2024-06-11T04:16:59.142Z (7 months ago)
- Language: C++
- Size: 54.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CPURT
![Build Status](https://github.com/WeakKnight/CPURT/workflows/build/badge.svg)
a handy cpu ray tracing kernel based on [BVH](https://github.com/madmann91/bvh).
### C++
```cpp
Context* cpurt_init(float* trisPtr, int triNum);void cpurt_dispatch_rays(Context* context, RayDesc* rayDescs, int rayCount, HitInfo* results);
void cpurt_release(Context* context);
```### Unity C#
``` csharp
IntPtr Init(Mesh mesh);void DispatchRays(IntPtr context, NativeArray rays, NativeArray hitInfos);
void Release(IntPtr context);
```### Performance
On an AMD Ryzen 9 5950X, it takes 0.2ms to shoot 512 rays at a mesh consisting of 15,000 triangles.