Why do I have such light problems with Android?

If I let run the game on my pc it looks so:

but if i run it on an android device it looks so:

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?

For me it was: Inspector → Light → Render Mode → Important (not Automatic) - good luck

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.

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.

So 4 years later… we could be having a similar issue…

There is an open issue about this: Unity Issue Tracker - [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.

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

Go to player settings> under settings for android change “lightmap encoding” to normal or high quality , as unity by default sets it to low, which makes the scene look awful

This fixed my lighting problem with mobile build with unity. I think you have to upgrade your openGL. You need to enable real-time lighting as well.

OpenGL ES 2.0
Unity doesn’t include OpenGL ES 2.0 in its built-in set of graphics APIs for Android by default. To add support for OpenGL ES 2.0:

Go to Edit > Project Settings.
In the Project settings window, select the Player tab, then open Android Player Settings:

Open the Other Settings fold-out. In the Rendering section, disable Auto Graphics API. This makes the Graphics APIs list appear.
To add support for OpenGL ES 2.0, select Add (+) and choose OpenGLES2.