• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
Question by zsiegel · Aug 08, 2017 at 02:39 PM · unity 5iosxcodefogopengl es2.0

[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/Grap$$anonymous$$csEmulation.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 t$$anonymous$$s 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 (t$$anonymous$$s is my first game), so maybe there is somet$$anonymous$$ng I am not realizing?

Any ideas? Thanks in advance!

screen-shot-2017-08-08-at-103247-am.png (42.8 kB)
Comment

People who like this

0 Show 0
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image

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 w$$anonymous$$te.

iPhone Fog: alt text Unity Fog: alt text

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.


iphone-fog.png (36.0 kB)
unity-fog.png (48.6 kB)
Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

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 w$$anonymous$$ch 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.

Comment

People who like this

0 Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image cs_shoutrlabs · Oct 06, 2020 at 12:39 PM 0
Share

I have an object in the foreground with a lot of subdivisions, but I still have the same problem

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

201 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

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

How to fix "Undefined Symbol: Error in Xcode compile time? 0 Answers

Unity 5.2 ios IL2CPP build gives null reference exception 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges