XANDER BERTENGet in touch
← ALL WORK
Graphics ProgrammingTool Development2024

Realtime Vulkan Shader Editor

A shader editor with a Vulkan 1.3 backend, hot-reloading shaders, runtime-editable materials, compute post-FX and glTF / OBJ import.

SOURCE ON GITHUB
XanderBert / VulkanPlayground
PUBLIC
C++GLSL
$ git clone https://github.com/XanderBert/VulkanPlayground
Open repository
Realtime Vulkan Shader Editor

What can it do?

  • Hot reloading shaders
  • Compute calculations
  • Runtime-expandable and runtime-editable dynamic uniform buffers / texture samplers
  • Dynamic rendering (fully available in the Vulkan 1.3 API)
  • Runtime creation of shaders and materials
  • Import .OBJ and .GLTF files at runtime
  • Gizmos to edit transform, scale and rotation
  • Edit shaders in a custom IDE
  • Change textures

Shading model

Reflections

  • Basic PBR
  • Simple cubemapping
  • Simple reflection on the model from the cubemap
  • Tone mapping
  • Gamma correction

Hot reloading shaders

So how does it work? First of all, I have a file watcher running on a separate thread. Operating systems send events when a file gets changed or added, so I listen for those.

On that event, the Shaderc compiler gets fired, which compiles the shader, and on success all the pipelines that use this shader get reloaded with the newly compiled shader.

Helmet

Compute shaders

I’ve started work on a system for compute post-FX in my editor. It already supports input and output images.

Compute post-FX

Why use Vulkan 1.3 dynamic rendering?

Mainly because it simplifies a lot around passes and subpasses, resulting in much cleaner and more readable code with the potential to be more efficient on more modern GPUs.

Why did I make it?

For my Graphics Programming 2 course, we learned the basics of the Vulkan API. For the final project, we had almost total freedom in what to make.

I learned to program shaders a few years ago with Nvidia FX Composer.

Nvidia FX Composer

I always wanted a more modern shader editor to learn GLSL, but every existing solution I found didn’t really fulfill my needs. So I decided to make my own, with Vulkan as the backend!

This project is still a work in progress.

Let’s talk light.

Open to graphics and rendering roles. The best way to reach me is email.

berten.xander@gmail.com