- Home /
Why do I have such light problems with Android?
If I let run the game on my pc it looks so:
http://www.youtube.com/watch?v=gbQiUxRYB-A
but if i run it on an android device it looks so:
http://www.youtube.com/watch?v=7ojnqPPCat4
If I move arount the corner it will get darker and darker and at the next corner it will get brighter and brighter.
Light is ambient, the end of sight in front of the player is made by fog and the shadows at the screen are made by blob-shadow-projector.
How can that be?
Answer by BetaBeat · Nov 30, 2015 at 03:22 PM
For me it was: Inspector -> Light -> Render Mode -> Important (not Automatic) - good luck
Yep, worked for me too. Point lights now showing up on Android. Thanks!
Thank you soooooo much! Your answer just ended a sleepless week trying to find a solution!
Answer by Bunny83 · Jun 25, 2013 at 10:56 PM
This is because "pixel lights" (light is calculated per pixel in the fragment shader) are quite expensive especially on mobile devices. Depending on your quality settings the pixel light count is set to 1,2,3 or 4. So the same geometry can only be affected by that much pixel lights. Unity will determine the lights at the current position and use only the brightest ones.
As alternative Unity will use vertex lighting. Vertex lighting doesn't calculate the light per pixel but per vertex. If your geometry is huge with only a few vertices the result is quite bad. A long wall can only be lit at it's corners, so in between it has to average the 4 corners.
Your options are:
Increase the pixel light count in the quality settings (or just choose a higher default level)
increase the vertex count in your geometry. For example the default plane object that comes with Unity has 11x11 vertices and works way better with vertex lit shaders as a 2x2 quad
You can also search the web for lighting solutions for mobile devices, there's a lot of information out there.
Answer by mashine87 · Sep 13, 2017 at 06:29 PM
If your problem occurs on low performance devices go to Edit - Project Settings - Graphics. In Tier settings for Tier 1 (Low) unselect 'Use defaults' and change Standard Shader Quality to Medium. It may affect performance but it fixed lighting problem for my app.
Answer by dputros · Oct 02, 2017 at 07:58 AM
So 4 years later... we could be having a similar issue...
There is an open issue about this: https://issuetracker.unity3d.com/issues/android-objects-with-mobile-vertex-lit-shader-ignore-point-light-and-spot-light-when-built-on-a-device-with-adreno-418-gpu
It seems like the spot light is being ignored by Vertex-lit shaders for a while now. Worth up voting this so unity can fix it, otherwise Vertex-Lit is potentially useless on Android with Point or Spot lights.
Answer by popescupatricia98 · Jul 19, 2018 at 07:23 AM
It is from fog, in Window-> Lighting-> Other Settings-> uncheck the Fog or change the mode to exponential.,It is from fog, in Window-> Lighting-> Other Settings-> uncheck the Fog