Shader warning in 'Roystan/Grass': Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
当出现这个错误提示时,可以检查下 shader的 target model
比如下面指定了 4.0 的 shader model,那么不支持4.0的设备将不能执行
#pragma target 4.0
不同的设备支持的 target shader model 是不一样的
#pragma target 4.0
- DX11 shader model 4.0.
- Not supported on DX11 9.x (WinPhone), OpenGL ES 2.0/3.0/3.1, Metal.
- Supported on DX11+, OpenGL 3.2+, OpenGL ES 3.1+AEP, Vulkan, PS4/XB1 consoles.
- Has geometry shaders and everything that es3.0 target has.
可以看下这里 https://docs.unity3d.com/Manual/SL-ShaderCompileTargets.html
geometry shader 在Metal上是不支持的
2.5: derivatives
3.0: 2.5 + interpolators10 + samplelod + fragcoord
3.5: 3.0 + interpolators15 + mrt4 + integers + 2darray + instancing
4.0: 3.5 + geometry
5.0: 4.0 + compute + randomwrite + tesshw + tessellation
4.5: 3.5 + compute + randomwrite
4.6: 4.0 + cubearray + tesshw + tessellation
Unity技术交流 微信公众号 UnityAsk,QQ群:891920228
网友评论