Unity 5.6 release notes say compute shaders can now work with Metal.
I wrote a simple project, that uses compute shader to render a fractal. And tried to run it on Mac. It didn’t work. The app started, but compute shader related part doesn’t seem to render anything.
I tried to use unity 2017 to build a project that utilizes compute shader for Metal. And it doesn’t work again. Is there a solution? Have anyone tried and succeeded in making compute shader work on Mac?
I just tried your app and: nope, not working for me either.
It’s pretty dismaying that a feature that has been proclaimed as working for a couple of major releases now is very clearly NOT working in simple test cases and with no acknowledgement of that fact from Unity
I have had a number of different compute shaders working fine on macOS ever since the first metal compute shader support came out in beta.
Not everything works, and it can be hard to find the cause when some stuff does not work. There are also differences between metal in different versions of macOS, so I usually try to update as soon as possible (eg I’m on High Sierra now). Metal editor mode also has some issues at times, which don’t always affect the build versions. Also sometimes the non-compute shaders in a project that was originally designed for platforms like DX11 have issues with metal because you have to make sure those shaders have the right pragma target (eg 4.5 not 5.0).
So I’m afraid the devil is very much in the detail on this one.
Hey elbows, thanks for answering, not much people seem to be into this area.
Could you please bring any examples of what caused compute shader fail in your experiments? Some specific commands?
Also, do you have any idea, what does the fact compute shader doesn’t always mean? Is it because metal API has some differences with directX API? Or it’s rather because Unity compiles something incorrectly?
Btw, when I tried to build for Vulkan, the compiler complained on some commands, like if Vulkan has different requirements. Don’t you have any experience with compute shader on Vulkan to share?
No specific commands either - the only compute shader stuff I’ve written myself works. It’s certain projects that were originally for DX11 that are on GitHub or the asset store that I have had problems with, and they are often too large and complex for me to narrow down the problem area.
I have seen warnings in the console that sometimes give clues, next time I get one I will post it here as an example. Other errors give no obvious clues and result in either missing visuals or even hard computer crashes (eg some scenes in the asset store item called TC particles).