rayray
A tiny GPU raytracer!
(more details on the project homepage)
Features
- Diffuse, metal, and glass materials
- The only three shapes that matter:
- Spheres
- Planes (both infinite and finite)
- Cylinders (both infinite and capped)
- Any shape can be a light!
- Antialiasing with sub-pixel sampling
- Will crash your entire computer if you render too many rays per frame (thanks, GPU drivers)
Implementation
- Built on the bones of Futureproof
- Written in Zig
- Using WebGPU for graphics
via
wgpu-native
- Shaders compiled from GLSL to SPIR-V with
shaderc
- Minimal GUI using Dear ImGUI, with a custom Zig + WebGPU backend
- Vaguely based on Ray Tracing in One Weekend, with a data-driven design to run on the GPU.
Project status
This is a personal / toy project,
and I don't plan to support it on anything other than my laptop
(macOS 10.13, zig-macos-x86_64-0.8.0-dev.1125
,
and wgpu-native
built from source).
I'm unlikely to fix any issues, although I will optimistically merge small-to-medium PRs that fix bugs or add support for more platforms.
That being said, I'm generally friendly, so feel free to open issues and ask questions; just don't set your expectations too high!
If you'd like to add major features, please fork the project; I'd be happy to link to any forks which achieve critical momemtum!
License
Licensed under either of
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.