I’m having a problem with the Unity Standard shader. On a specific distance, all metalness is rendered white:
The strange problem here is, that if I go near with the camera, it will be rendered normal. More strange is that this is only happening with my iPhone 6, iPhone 6 plus and iPad 4 (so I guess all newer Apple devices).
If I’m running the scenery on my iPhone 4S, it works perfectly like in my editor.
I tried ESGL 2.0, as well as Metal (also ESGL 3.0, but that had some other problems as well).
I don’t have a solution but I think you should file a bug report (and post the # here). Most topics about the standard shader and mobile don’t get much attention for some reason. A bug report is the best chance to get someone to look at your problem.
Thx @zyzyx but I already opened a bug ticket (case 715326) along with a project and scene to reproduce it. I thought maybe other devs have seens this too and have a work around for it (other than replacing all standard shaders which we’re having in mind now, as we can’t solve the issue).
I see
We still use the skyshop (1.6.2) mobile shaders because of the lack of documentation and support for the standard shader on mobile. Especially with GLES 2.0.
@Sayduck Actually no. I showed it to some Unity guys, got some responses, but no real solution to fix the shader problem. What we did to fix it (which also some Unity people suggested) was to decrease the scaling of the 3D models. First our scaling was 1 unit was 1 centimeter, now 1 unit is 1 meter (I think somewhere in the docs were that suggested too). The problems went away after that, but we had a lot of work to scale almost every asset down (maybe you can do it by only adjusting the import scaling, but I’m not sure. Should work though).
So in conclusion, I would say we hit at some distance the maximum values for the shader in its calculation and by decreasing the scaling we have avoided that problem.
Why is it a big problem? The bug only occurs if your 3D models have a very big scaling and you should be easily able to fix that by changing your import scaling for the model.
The bug is not nice, but I can see that at some point calculations with very huge numbers may cause problems, even (or especially) inside the engine.