How to get rid of lines on terrain?

I making a car game with unity3d. When I played the game on pc, no problem. But when I played it on my android device, screen looks like this photo. How to remove these lines on terrain?


FYI, I’ve had the same issue, and for me it was fixed by increasing the values for Bias and Normal Bias in my sun’s Shadow settings. Google “Shadow acne” or check here for more info:

You can’t use any “normal” shader on a projector. You have to use a projection shader which you can find in the projectors unitypackage. Just select Assets->Import Package->Projectors. It contains two shaders that will work with the projector:

  • Projector Multiply
  • Projector Light

The projector itself doesn’t render anything. All it does it determines which objects intersect it’s projection volume / frustum and rerenders those objects with the material of the projector. You need a very special shader for the projector that renders the object with the projection texture at the right spot. For this it needs two additional matrices _Projector and _ProjectorClip which are setup by the projector.

To resolve the problems with the lines, you can disable the texture you are using for your light cookies. The problem is likely the image format you are using for your cookie, or import settings.

You will want to first look at the format and make sure it is setup properly for Android. This is generally done in the import settings, specifically, try to make sure mip maps are unchecked. Next make sure your light cookie texture is set to clamp and not repeat. This will definitely cause the problem you are seeing.

Next go to your build settings and check what texture compression setting you are using. There may also be a problem here.

I can tell that the problem is not a lighting problem, but more of a texture problem with your lighting cookies.