Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jsoulier/sdl3_ray_tracing
Ray Tracing In One Weekend using the new SDL3 GPU API
https://github.com/jsoulier/sdl3_ray_tracing
c glsl raytracing sdl sdl2 sdl3 shaders
Last synced: 3 days ago
JSON representation
Ray Tracing In One Weekend using the new SDL3 GPU API
- Host: GitHub
- URL: https://github.com/jsoulier/sdl3_ray_tracing
- Owner: jsoulier
- License: unlicense
- Created: 2025-01-28T08:55:11.000Z (13 days ago)
- Default Branch: main
- Last Pushed: 2025-01-30T02:28:15.000Z (11 days ago)
- Last Synced: 2025-01-30T03:22:35.397Z (11 days ago)
- Topics: c, glsl, raytracing, sdl, sdl2, sdl3, shaders
- Language: C
- Homepage:
- Size: 698 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# SDL3 Ray Tracing
Implementation of [Ray Tracing in One Weekend](https://raytracing.github.io/) using the new SDL3 GPU API with compute shaders
![](image.bmp)
*200 samples, 20 bounces, and a 960x540 image taking around 30 seconds on integrated AMD Ryzen 7 4700U Graphics*### Building
#### Windows
Install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) for glslc
```bash
git clone https://github.com/jsoulier/sdl3_ray_tracing --recurse-submodules
cd sdl3_ray_tracing
mkdir build
cd build
cmake ..
cmake --build . --parallel 8 --config Release
cd bin
./sdl3_ray_tracing.exe
```#### Linux
```bash
sudo apt install glslc
``````bash
git clone https://github.com/jsoulier/sdl3_ray_tracing --recurse-submodules
cd sdl3_ray_tracing
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --parallel 8
cd bin
./sdl3_ray_tracing
```### Bugs
Drivers may throw `VK_ERROR_DEVICE_LOST`.
To fix, you can try either of the following:
1. Lower the number of samples and bounces (see [config.h](src/config.h))
2. (Windows only) Set `TdrDelay` in the Windows Registry (see [here](https://learn.microsoft.com/en-us/windows-hardware/drivers/display/tdr-registry-keys))