- Home /
Unity iPhone: difference between shader and iPhone-shader?
Hi,
im working on a unity-iphone project right now and id like to know wheres exactly the differences between the standard shader and the special iphone-shader? Should i use only the iphone-shader oder whats going on with the standard shader? It would be great to have the same shader-manual for the iphone-sahder like it consists already for the non-iphone-version.
Thanks for your help, yosh
Answer by Jessy · Feb 15, 2010 at 11:34 PM
The most important difference is that CG/GLSL is not supported in Unity iPhone. (The original GPU is fixed function only.) You can find more information here:
Knowing that, nearly everything found in the ShaderLab Reference will work on the iPhone. I agree with you that the differences need to be documented, however. Here are a couple things, that I know of, that aren't listed as not working, but still don't work:
- Cubemaps
- SeparateSpecular command
- Three-argument texture combiner functions (except Lerp)
- GrabPass
Every shader included with Unity will work on the iPhone, but that's only because of Fallbacks. Generally, if you don't want to write your own shaders, it's a good idea to use the ones in the iPhone standard assets, because they are designed to run a little faster than the non-iPhone stuff.
Edit: Re-reading your question, I'm thinking perhaps you mean that the iPhone shaders should have documentation such as is found in the Built-in Shader Guide. Although I agree with that, the shaders that can run on the iPhone are much less complex than most of the other shaders, so it's to every Unity iPhone developer's benefit to learn the simple ShaderLab language, and write their own very fast shaders. As it is, a couple of us have begun adding this kind of extremely fast, simple shader, to the wiki. Glancing over them would probably be a good way to help yourself learn, if you're interested:
http://www.unifycommunity.com/wiki/index.php?title=Shader_Archive#iPhone
Thanks for your information, jessy. It helped me a lot and now i will have a look at the shader guide. thanks.
Your answer
![](https://koobas.hobune.stream/wayback/20220612071607im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Is there a way to visually show the order in which geometry was rendered in your scene. 1 Answer
VertexLit Hilight Shader - Flicker on iOS Problem 1 Answer
Glow and Bloom Effects on iPhone 3 Answers
Animated television static effect, techniques? iPhone shader 2 Answers
Displaying background layers effectively on iPhone 0 Answers