defold icon indicating copy to clipboard operation
defold copied to clipboard

Compute shaders

Open abadonna opened this issue 3 years ago • 4 comments
trafficstars

It would be great to have compute shaders for heavy calculations (e.g. combining blend shapes in meshes, skinning, physics simulation, etc) Now with Vulkan support it should be possible to make it cross platform (OSX has outdated OpenGL)

abadonna avatar Jan 02 '22 07:01 abadonna

Occlusion culling on GPU discussed here: https://github.com/defold/defold/issues/3406#issuecomment-1003941486

britzl avatar Jan 03 '22 10:01 britzl

Yes I agree, there's loads of benefits in using compute shaders and as discussed in the culling issue most targets support compute by now (even webgl) so we could start looking into this soon-ish I think. My intention is to start fiddling with compute just to get my hands warm with it in regards to how the shader language works between glsl -> spirv for vulkan / moltenvk.

Jhonnyg avatar Aug 11 '22 11:08 Jhonnyg

I have looked a little bit into this and one issue is that compute shaders are not supported on osx with OpenGL due to deprecation. The version supported by osx doesn't have any compute support, so this feature would only be available for a mix of platform and devices, which complicates things. I think we could still build support for it, but that issue complicates things a bit unfortunately..

Jhonnyg avatar Jan 09 '23 10:01 Jhonnyg

Well, we still can use openCL to achieve similar performance. https://github.com/abadonna/defold-opencl

abadonna avatar Oct 21 '23 16:10 abadonna