Render Vulkan on a web browser

Im building a game engine which is primarily designed to develop FPS games. The engine runtime is written in C++. The default graphics API is Vulkan. For the editor, im planning on hosting the front end on a web browser (preferably chrome) and all the other work is done by the back end which is written in C++. The UI is to be written in JavaScript.

My question is, is there a way to render the Vulkan scene directly to the web browser? Or should i have to stream all the frames from the back end to the front end like a video?

Thank you!

Hello there,

I think there is no way Vulkan will run in the browser directly since this is more a usecase for WebGL.
I am not aware of any implementation where Vulkan is running in a browser.

However, you could take a completely different approach: Why not render your HTML UI directly with Vulkan as well? You could be using Chromium Embedded Framework (CEF) together with Vulkan API. This is very tricky to do but I think it has already been done.

Best regards,

1 Like

There is another solution:

If you wish your engine to also run in the browser, you can target an upcoming specification called WebGPU. The structure is modeled after Vulkan, and runs in the latest browsers. This would allow you to develop and test from a browser, yet publish to desktops as well as the web.

1 Like