UV mapping tiles on mesh bleeds texture when camera is at certain angle

Hi there!

So I generate meshes with tiles on them and I want to make each tile have a texture. Each tile has 4 unique verticies and each mesh / chunk is 100x100 tiles. I read that it is best to use UV mapping with a texture atlas when using tiles like this, rather than using SetPixels() to create a unique texture for every mesh. So in the images below I set the UV mapping for each tile to the grass part of the texture shown in the first image. (0.4, 0.4) (0.6, 0.4) (0.4, 0.6) (0.6, 0.6). So I was just wondering why the entire texture shows when I tilt the camera in the distance? It starts at a certain distance from camera and has a half-circle shape. It would work fine if it was a 2D game, but it is a top down 3D. The only “solution” I found is to set the padding to 3x the tile width, so if the tile takes a 32x32 texture, then I need 96px of padding around it in each direction with a similar color to make it not look ugly. Also this limits the amount of texture tiles I can use.

Tilted camera view:
alt text

Tilted camera view with “generate mip maps” set on":
alt text

Top down view:
alt text

So I turned off anti aliasing in quality settings and this fixed the issue with the magenta color showing up in the distance as shown in the first image.
I am now using the free Post Processing Stack asset to add it back to the camera and it doesn’t have the weird effects as before.

Because you use mipmaps. Mipmaps are down sampled versions of the same texture which are used when the sampled area on the screen is very small.

Your options are

Either disable mipmapping or if you really need mipmapping you might need to generate the mipmap levels manually and make sure the tiles are aligned to power-of-two position and scale.