It's not quite the same as generating new geometry from a compute shader, but unfortunately there aren't a lot of tutorials on that topic. See this tutorial that describes using Compute shaders to do deformation. You then have to write custom shaders that can take the output of the Compute shader in place of mesh's vertex data. If you want to take some mesh and modify it with a Compute shader you have to manually copy the mesh data into buffers that you pass to the Compute shader. Unfortunately using Compute shaders for this requires a lot more work to implement, and Unity doesn't make things particularly easy here. Those are emulated with a Compute shader.Īnd that's kind of the answer, if you want to use Geometry shaders for something, you probably actually want to use a Compute shader. Metal technically doesn't even support Tessellation shaders, not directly. Which is why Apple's Metal API supports Compute, but not Geometry shaders. That's not to say that Geometry shaders are always the slowest option, just that there are more efficient options. So the question you might be wonder is, why?īecause Geometry shaders, while convenient, are horribly inefficient. In part because Apple's Metal graphics API does not support Geometry shaders, and so they don't bother to support it with their own chips. Likewise, there are features of both the URP and HDRP that will not work as they are also Compute shader based.Īdditionally, while you can run "OpenGL 4.1" applications on the new M1 based Macs, those will not support Geometry shaders as the hardware does not support them, at all. There are also several assets on the store that make use of Compute shaders which will also obviously not work. Not having Compute shader support means a lot of Unity's post processing effects no longer work, or run using slower versions of the effect. Apple explicitly chose to not support any version of OpenGL past 4.1 in MacOS. If you ran Windows on the Intel based Macs they would be able to use OpenGL 4.3 or better, which supports both Geometry shaders and Compute shaders. Note: the hardware in desktop Macs from roughly the last decade have all supported Compute shaders. This means it does not support Compute shaders, when using OpenGL. MacOS's OpenGL support is limited to OpenGL 4.1. Permission Handling: The Vuforia Engine behavior of triggering. To use Geometry shaders you must force the game (and editor if you're developing on the Mac) to use OpenGL instead of the default Metal API.īut this comes with several huge caveats. Unity on MacOS Notice: If you are experiencing DLL related issues on Mac when working in.
0 Comments
Leave a Reply. |