[Not Answered] Fog not working iOS Build
I am building a Unity Game that has fog as a component in the lighting window. I disabled "Auto Generate" because I switch scenes and I need the lighting to instantly update. ![alt text][1]
The fog is working perfectly when I run the game in Unity and when I build the game for PC & Mac. However, when I build the game for iOS the fog stops working.
I am running the game on Metal. I have disabled OpenGLES2 because according to https://docs.unity3d.com/Manual/PostProcessing-Fog.html a requirement of fog is depth textures. And according to https://docs.unity3d.com/540/Documentation/Manual/GraphicsEmulation.html only OpenGLES3 and Metal support depth textures. So, I have come to the conclusion that only Metal supports shadows on iOS.
Side note: I tried using OpenGLES2 on my game for iPhone and the result was not ideal. The lighting broken. But this is beside the point.
When I ran my game on iOS using Metal, (and the log on Xcode shows that it was using metal), there were still no shadows. I am still a beginner to unity (this is my first game), so maybe there is something I am not realizing?
Any ideas? Thanks in advance!
Answer by zsiegel · Aug 08, 2017 at 04:13 PM
Upon further testing I've come to the conclusion that the fog is on the iPhone, but it look different. Instead of having the fog appear in the distance, when I increased the fog to 0.2 (to show the drastic difference) the whole screen on the iPhone just became tinted white.
iPhone Fog: Unity Fog:
They are both using the same settings. I took the 1st screenshot in unity, and I took the 2nd screenshot on my iPhone using the built project for iOS.
Answer by prithul · Jan 12, 2018 at 06:38 PM
I was facing the same issue. So for anyone who is having trouble, the solution is that you need to subdivide the face along which you want to see your fog gradient. For example, in the pictures posted by the op, the ground plane needs to have more subdivisions in the forward direction for fog to work.
I have an object in the foreground with a lot of subdivisions, but I still have the same problem
Your answer
Follow this Question
Related Questions
ios app crashes on start 0 Answers
Signal SIGABRT in XCODE. How to solve it ? 0 Answers
iOs build fails on 5.3 1 Answer
converting managed assemblies to c++ building to ios and unity crashes 1 Answer
unity 5.3 iOS mscorlib.dll error 0 Answers