- Home /
Specular Materials on iPhone or Android?
Is it possible to have material with some amount of visible specularity (reflection, refraction behavior to light, etc) on the iPhone or Android? I've tried all the specular materials I could find, a couple of shader snippets from online, and... no evident specularity.
i am very interested in any result! it would be really nice if you could share your shader code here. tnnx!
Answer by Jessy · Dec 30, 2010 at 03:57 PM
Sort of. The reason you don't notice any specularity, most likely, is that SeparateSpecular On doesn't do anything. (This is true of iOS devices; I have no experience wit Android.) That means that your specular highlights are being multiplied into your texture, instead of added, which is generally a much more subdued effect. I'm sure this can be overcome with programmable shaders, but pure ShaderLab code will fail you for shiny things. I reported this bug a long time ago, but never heard back. If it's a hardware limitation, fine, but it at least needs to be documented.
hmmm any further references for a workaround to get better specular's?
Only build for later hardware, and don't use "mobile" shaders. I can help you write a 2-pass shader if you ask elsewhere, being very specific, and first trying to make on yourself. The key is to only use specular light in the second pass, and add that in. It will run on anything, but be highly inefficient, considering you'll be rendering the entire thing over again, and blending, just for a little better lighting, on hardware so bad that lighting will probably not look or run great anyway.
do you have any screenshots of how a 2-pass shader material looks on mobile?
No. It would look the same as in the Editor, though, so just look there on your own screen. There is currently no way to emulate this behavior, other than modifying your shaders to have SeparateSpecular On removed, or changed to SeparateSpecular Off.
Your answer
Follow this Question
Related Questions
Memory Managmenet 1 Answer
Optimizing bump map or luminous textures on spheres for mobile 1 Answer
How can you paint materials on terrains? 0 Answers
Android / iPhone deployment.. 2 Answers
Unity games and web comunication 1 Answer