"Platform does not support compute shaders" In Dev Console When Compiled to WebGL

Hi, I’m trying to build my project to WebGL but the dev console keeps spitting out errors and evidently the compute shader isn’t working. The UI is working and the app even slows down when I increase the object count. When I click on the error, this is what I get.

Debug Profiler:

Video of what it looks like:

Video of what it’s suppose to look like (built as .exe)

I’m new to using WebGL. Is there something I should know about this?

It’s like it says, WebGL does not support compute shaders, unfortunately. It’s a big hole in the WebGL standard, which Unity has no control over.

Last year it was supposedly finally added to the specification, but as far as I’m aware most browsers have not updated to support that spec yet and thus no reason for Unity to either (I think Chrome technically does through its ANGLE api, not sure about the other browsers).

A new API called WebGPU is currently in experimental support by the major browsers, but it is not enabled by default yet so Unity hasn’t had reason to implement it yet. But hopefully they’ll be on top of that when the time comes.

3 Likes

The alternative is to refactor your effect to use pixel shaders instead, using render targets instead of structured buffers.

Thank you!