Hello, I’m developing a game for mobile devices and I’ve found something that doesn’t appear to be correct while creating a custom shader.
The fact is that the same error can be reproduced just adding a Unity plane with a Unity Specular Shader and one light.
In this screenshot you can see the result in my Mac (In android I get the same result):
Everything is correct. On the contrary, the same escene in my iPad2 renders like this:
From my experience with shaders, this generally happens when low precision in fragment shader is selected instead of high precision. So, I can think about three possible reasons:
- Unity shaders parser doesn’t write highp when it generates the native shader that runs on the device.
- Unity uses some precision pragma directive that the device’s driver doesn’t process correctly.
- I don’t undestand well the way I can get the correct result.
Can you help me? Thanks in advance!