https://github.com/jsoulier/sdl3_ray_tracing_in_one_weekend
Ray Tracing In One Weekend using SDL3 GPU with compute shaders
https://github.com/jsoulier/sdl3_ray_tracing_in_one_weekend
c glsl raytracing sdl sdl3 shaders
Last synced: about 2 months ago
JSON representation
Ray Tracing In One Weekend using SDL3 GPU with compute shaders
- Host: GitHub
- URL: https://github.com/jsoulier/sdl3_ray_tracing_in_one_weekend
- Owner: jsoulier
- License: unlicense
- Created: 2025-01-28T08:55:11.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-03-11T15:49:29.000Z (about 2 months ago)
- Last Synced: 2025-03-11T16:39:11.899Z (about 2 months ago)
- Topics: c, glsl, raytracing, sdl, sdl3, shaders
- Language: C
- Homepage:
- Size: 1.51 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# SDL3 Ray Tracing In One Weekend
Implementation of [Ray Tracing in One Weekend](https://raytracing.github.io/) using the new SDL3 GPU API with compute shaders

*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_rtiow --recurse-submodules
cd sdl3_rtiow
mkdir build
cd build
cmake ..
cmake --build . --parallel 8 --config Release
cd bin
./sdl3_rtiow.exe
```#### Linux
```bash
sudo apt install glslc
``````bash
git clone https://github.com/jsoulier/sdl3_rtiow --recurse-submodules
cd sdl3_rtiow
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --parallel 8
cd bin
./sdl3_rtiow
```### 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))