https://github.com/AnyDSL/traversal
AnyDSL traversal code
https://github.com/AnyDSL/traversal
amdgpu bvh cuda gpu nvvm raytracing traversal
Last synced: 8 months ago
JSON representation
AnyDSL traversal code
- Host: GitHub
- URL: https://github.com/AnyDSL/traversal
- Owner: AnyDSL
- License: lgpl-3.0
- Created: 2015-05-19T16:00:24.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-02-18T16:22:25.000Z (about 7 years ago)
- Last Synced: 2023-08-30T00:37:58.467Z (over 2 years ago)
- Topics: amdgpu, bvh, cuda, gpu, nvvm, raytracing, traversal
- Language: C++
- Homepage:
- Size: 44.2 MB
- Stars: 12
- Watchers: 39
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Traversal #
This is the main repository for the AnyDSL traversal code.
## Requirements
The traversal code comes in two flavours:
* A CPU version, which requires an x86 processor with the AVX, AVX2 and FMA instruction sets.
* A GPU version, based on CUDA, which requires a Maxwell GPU or a higher model.
## Building
git clone https://user@github.com/AnyDSL/traversal.git
cd traversal
mkdir build
cd build
cmake-gui ..
## Running
The frontend benchmarks the traversal code and generates an output which contains the intersection parameters.
It takes as input the scene file (which contains the acceleration structure) and the ray distribution.
Run it with `-h` to get the list of options.
When runnning the traversal on the GPU, make sure to run the executables in the directory where the file containing the compiled kernels (e.g. `traversal.nvvm` for the NVVM backend) is located.
A sample BVH file and a primary ray distribution are provided for testing. You can use them with the frontend, like so (replace `` with `cpu` or `gpu`, depending on which device the traversal runs):
cd build/src
./frontend_ -a ../../testing/sibenik.bvh -r ../../testing/sibenik01.rays -n 80 -d 20 -o output.fbuf
Then, check the results with the `fbuf2png` tool:
./fbuf2png output.fbuf image.png
You can also use the BVH file with the `viewer` utility:
cd build/src
./viewer_ -a ../../testing/sibenik.bvh
## Tools
This repository also includes some tools to generate ray distributions for primary rays, and to convert the output
of the frontend into a PNG image. You need _libpng_ installed to compile them. Run them with `-h` to get the list of options.