file:///Applications/Unity%20iPhone/Unity%20iPhone.app/Contents/Documentation/Documentation/Manual/iphone-unsupported.html
据我所知,并不是ShaderLab Reference所有功能都能在iPhone中运行良好,不支持的功能列表如下:
1、Cubemaps
2、SeparateSpecular command
3、Three-argument texture combiner functions (except Lerp)
4、GrabPass
之所以Unity中的每个shader都能在iPhone上运行良好,是因为Unity中的Fallbacks预设机制。如果想要编写自己的shader,最好依据iPhone standard assets中的shader, 因为其中的shader做了简化与优化,运行更高效。
http://www.unifycommunity.com/wiki/index.php?title=Shader_Archive#iPhone
补充学习:
Unity provides a language called "ShaderLab" which is similar to Nvidia's CgFX. You can use this to write custom shaders including vertex & fragment programs.
Read more about it in the Unity reference manual here: http://unity3d.com/support/documentation/Components/SL-Reference.html
A good way to start off is to have a look at the source code for Unity's built-in shaders, which you can download here:http://unity3d.com/download_unity/builtin_shaders.zip
Or check out the custom shaders that people have put up on the Unity Wiki, here:http://www.unifycommunity.com/wiki/index.php?title=Shaders