JulGame.jl icon indicating copy to clipboard operation
JulGame.jl copied to clipboard

Use JuliaWGPU ecosystem for GPU support

Open VarLad opened this issue 1 year ago • 6 comments
trafficstars

It provides the most widely compatible vs powerful backend for writing GPU shaders at the moment. I'll try looking into this at some point.

VarLad avatar Jan 22 '24 00:01 VarLad

Admittedly, I am not knowledgeable enough to even know what this could do/how it can integrate here. I would love more information about this.

Kyjor avatar Jan 22 '24 13:01 Kyjor

@Kyjor Sorry for the late reply. Think of WebGPU as an OpenGL replacement for writing GPU stuff. Its not as verbose as Vulkan, and is well supported by web browsers as well.

I was trying to recommend it as a replacement for OpenGL for your:

The plan for 3d will be to use OpenGL.

As a bonus, WebGPU compiles to Vulkan on Linux, Metal on MacOS, DirectX11/12 on Windows and is supported directly in the browser. You can get the best performance for all platforms with one API.

There's some effort to write good Julia bindings for WebGPU over in: https://github.com/JuliaWGPU/ You can read more about WebGPU itself here: https://www.w3.org/TR/webgpu/ https://developer.mozilla.org/en-US/docs/Web/API/WebGPU_API

VarLad avatar Jan 31 '24 14:01 VarLad

That sounds very promising! I don't think I'll have the bandwidth for 3d at all this year if things go the way I think. A lot of this year will be spent refining the editor tools in the engine. But that's definitely interesting, and I would be open to any contributions to make that happen sooner than expected! 😄

Kyjor avatar Jan 31 '24 22:01 Kyjor