- Home /
Errors with shaders/materials on newer iOS devices
Hey there, I'm having a strange error drawing the ground object for my game on newer iOS devices
The ground in my game has a sand coloured material as well as shadows from other objects falling onto it. However, for some reason, half of it gets drawn white and no shadows are applied. (see image below)
It happens only on iPhones 5S and newer. It does not happen on Android. Since it only happens on devices running Metal Graphics I figured it had something to do with that. I deleted Metal from the Auto Graphics API list in the Player Settings. It is now using OpenGLES 3.0 then 2.0 as the graphics API but it is still occurring (I will try removing 3.0 and just use 2.0 and see if the error persists).
Just wondering if there is anyone else who has gotten this error and if they have figured a way to fix it?
Okay so I have tested the project and confirmed that this error does not occur with Open GL ES 2.0. Only 3.0 and $$anonymous$$etal.
The rest of the scene appears to have renderered ok, so is there anything different about the material assigned to that object?
Nothing that comes to $$anonymous$$d. Created it in the editor just like all the others. Also if you look closely, you can see that half of it gets rendered properly, but the other half is all white.
Standard shader. I just edited my question to include a screenshot of the material on the game object not being rendered properly
Try $$anonymous$$obile diffuse. There's also a version of it out there with the ability to add color/tint without texture.
Answer by Naphier · Jul 26, 2016 at 02:12 AM
The answer is to use mobile diffuse shader on mobile devices. It's more guaranteed to work.
Follow up question: @jaysbays says:
This worked, thank you! Any idea why the shadows now slightly flicker (they look like they are wobbling back and forth) whenever the camera moves?
That's tough, sounds like the shadow quality. You would thin the shadows would be just fine onto mobile diffuse shaders, but maybe not. You could try deferred lighting. If your level is not generated you could bake the lights and likely have better results.
Thanks again! Switched to deferred rendering on iOS only (forward on Android) and the problem seems to be solved.
Glad deferred worked out. You should report the issue to Unity too, so they know it exists. Cheers!
Your answer
Follow this Question
Related Questions
Transparency working in the editor but not when I build 0 Answers
Vertex Fragment Shaders are BROKEN? 2 Answers
Efficient shader for sky plane 1 Answer
Error: Material doesnt have texture property. 1 Answer
See through issue in iOs 0 Answers