I have a golf ball in my Unity game for Android, which is an icosphere (imported from blender) with a baked normal map. There are 18 tracks located in one level around the (0, 0) coordinate, rotated in different directions.

The game uses Distance Shadowmask to create realtime shadows for near objects. In the editor and Windows builds, this works perfectly.
Ball Ingame PC

On Android, the shadow has a lower resolution, which is fine, but it seems to slice through the ball. It is visible in the following screenshot. If the ball moves, it looks like it passes through several planes casting a shadow.

Ball Ingame Android

This is heavily depending on the current track the ball is on. In 3 of the 18 tracks, there are very noticeable errors. Some other locations show very small errors.

However, those tracks are on seemingly random position. While the heavy errors appear on tracks located mainly in this (-x, -z) area, the small errors appear on arbitrary other positions.

I already tried:

  • changing shadowmap resolution
  • changing the directional light's near plane
  • changing the directional light's bias and normal bias
  • changing the directional light's position and rotation
  • rebaking the ball's normal map
  • using another ball mesh
  • removing the normal map from the material
  • using a different device

You must log in to answer this question.

Browse other questions tagged .