5 releases

0.0.5 Oct 19, 2024
0.0.4 Aug 17, 2024
0.0.3 Aug 14, 2024
0.0.2 Aug 7, 2024
0.0.1 Aug 3, 2024

#24 in Rendering engine

Download history 111/week @ 2024-07-29 169/week @ 2024-08-05 246/week @ 2024-08-12 15/week @ 2024-08-19 5/week @ 2024-09-16 20/week @ 2024-09-23 3/week @ 2024-09-30 2/week @ 2024-10-07 140/week @ 2024-10-14 22/week @ 2024-10-21 4/week @ 2024-11-04

166 downloads per month

GPL-3.0-only

39KB
419 lines

Kiyo

build crate

What is Kiyo?

A lightweight compute shader engine using ash.

Kiyo provides a simple configuration interface to run compute shaders. The following features are implemented:

  • Multiple subsequent compute passes
  • Shared storage images between them
  • GLSL compile logging
  • Shader hot-reloading

For any feedback or requests you are very welcome to create issues or contact me directly!

You can find examples in ./examples/ and in my toy project repository.

Shader environment variables

These variables are accessible in the shader and provided by Kiyo itself, do not overwrite these as bugs will be introduced.

  • NUM_IMAGES - The amount of accessible storage images.
  • WORKGROUP_SIZE - The workgroup size at which the shaders should run.

Building & running

Make sure you have the Vulkan SDK installed.
Then build and run kiyo:

git clone https://github.com/angelocarly/kiyo.git
cd kiyo
cargo run --example simple-render

GPU debugging

Windows & Linux

Renderdoc!

Mac

Mac only has XCode's Metal debugger. In order to use it you need to provide the following environment variables:

VULKAN_SDK=$HOME/VulkanSDK/<version>/macOS
DYLD_FALLBACK_LIBRARY_PATH=$VULKAN_SDK/lib
VK_ICD_FILENAMES=$VULKAN_SDK/share/vulkan/icd.d/MoltenVK_icd.json
VK_LAYER_PATH=$VULKAN_SDK/share/vulkan/explicit_layer.d

Then you should be able to launch your kiyo application and capture a frame.
This video does a nice job explaining the process.

References

  • sound-shader - Cpal wrapper code and shader audio inspiration

Libraries

  • cen - Window management and Vulkan wrappers
  • ash - Vulkan bindings

Dependencies

~41–56MB
~1M SLoC