https://github.com/Twinklebear/dxr-ao-bake
A demo of ambient occlusion map baking using DXR
https://github.com/Twinklebear/dxr-ao-bake
Last synced: 6 days ago
JSON representation
A demo of ambient occlusion map baking using DXR
- Host: GitHub
- URL: https://github.com/Twinklebear/dxr-ao-bake
- Owner: Twinklebear
- License: mit
- Created: 2020-06-14T00:18:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-04-07T05:40:48.000Z (over 3 years ago)
- Last Synced: 2025-10-06T02:46:26.931Z (about 2 months ago)
- Language: C++
- Size: 1.04 MB
- Stars: 65
- Watchers: 1
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- anything_about_game - dxr-ao-bake
README
# DXR Ambient Occlusion Baking
A demo of ambient occlusion map baking using DXR inline ray tracing.
Uses [xatlas](https://github.com/jpcy/xatlas) to unwrap the mesh.
The mesh is rasterized into the atlas image by using the UV
coordinates as the output vertex positions, and the AO factor
computed by using inline ray tracing in the fragment shader.
## External Dependencies
Requires DXR 1.1 support for in line ray tracing.
- [SDL2](https://www.libsdl.org/download-2.0.php)
The easiest path to get SDL2 is through [vcpkg](). After installing SDL2
you should be able to build the app via:
```
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE="/scripts/buildsystems/vcpkg.cmake"
cmake --build . --config relwithdebinfo
```
If CMake doesn't find your SDL2 install you can point it to the root
of your SDL2 directory by passing `-DSDL2_DIR=`. The app also uses
GLM, which will be automatically downloaded by CMake during the build process.
## Examples
Sponza:

Suzanne:
