Vkrunner is a Vulkan shader testing tool similar to Piglit, written by Neil Roberts. It is mostly used by graphics drivers developers, and was also part of the official Khronos conformance tests suite repository (VK-GL-CTS) for some time . There are already posts  about its use but they are all written from a driver developer’s perspective and focus on vkrunner’s debugging capabilities. In this post, I’m going to show you an alternative use I’ve found for it, in order to have fun with pixel shaders during my holidays! 🙂
Vkrunner is basically a Vulkan program that loads custom shaders from scripts. It can load all possible combinations of shaders (VS, GS, TS, TE, FS and CS). Scripts are not required to have code for every type of shaders though, users can bypass one or more stages. This gave me the idea to write small scripts that only provide code for the pixel shader, in order to create visual effects like those people write on Shadertoy, where the access to uniforms and other resources is limited.
Here are some images I’ve generated by using Vkrunner as an even more limited (and challenging!) offline shadertoy:
A voronoi tunnel
A tunnel covered by a voronoi-pattern texture.
A mandelbulb fractal
This was a slightly modified version of a ray marching “helloworld” pixel shader I had on shadertoy.
The code is here: fractal.shader_test
A 2D plasma
A vkrunner test that renders a static plasma effect.
A mushroom (distance) field
Next image is from a WIP scene: it’s a field with mushrooms. I plan to finish it and explain it on a separate post (when it doesn’t look so bad!)
The current code is here: mushroom.shader_test
I might try to explain some of them in detail in some follow up posts. For the moment I am still playing and experimenting. 🙂