Mesh color overlap/blend issue

I’m sorry, but I don’t really know the proper term for this, and I’m assuming it’s some sort of overlapping/blend issue. I have a tile (attached tile.png), and I create a mesh with a bunch of these tiles as a background (attached issue.png and tiles.png might be more clear what the issue is). Also attached what the UV Checker looks like (uvchecker.png). And the material that I’m using has the “Unlit/Texture” Shader.

In issue.png, the yellow box is showing that these are rendering properly, but the black box is showing some sort of weird render issue where the white is predominant over the black that’s supposed be there. The output should be that all tiles are uniform and look like they do in the yellow box… no blending of white/black.

I was reading a couple of threads (mainly this one and this one), and shaders were mentioned in them, but I really don’t know if that’s what’s needed here. If someone could give me a clue if that is indeed the problem, that would help. I’m including my “AddToMesh” method that does the mesh building, but I’m not sure how helpful it will be:

public static void AddToMesh(
    int index,
    World.GridNode tile,
    Vector3[] vertices,
    Vector2[] uvs,
    int[] triangles,
    Color[] colors
)
{
    Vector3 baseSize = tile.GetQuadSize();
    Vector3 position = tile.GetWorldPosition();
    float rotation = tile.GetRotation();
    Color? color = tile.GetColor();
    tile.GetUVCoordinates(out Vector2 uv00, out Vector2 uv11);

    //Relocate vertices
    int vIndex = index * 4;
    int vIndex0 = vIndex;
    int vIndex1 = vIndex + 1;
    int vIndex2 = vIndex + 2;
    int vIndex3 = vIndex + 3;
    baseSize *= 0.5f;

    bool skewed = baseSize.x != baseSize.y;
    if (skewed)
    {
        vertices[vIndex0] = position + GetQuaternionEuler(rotation) * new Vector3(-baseSize.x, baseSize.y);
        vertices[vIndex1] = position + GetQuaternionEuler(rotation) * new Vector3(-baseSize.x, -baseSize.y);
        vertices[vIndex2] = position + GetQuaternionEuler(rotation) * new Vector3(baseSize.x, -baseSize.y);
        vertices[vIndex3] = position + GetQuaternionEuler(rotation) * baseSize;
    }
    else
    {
        vertices[vIndex0] = position + GetQuaternionEuler(rotation - 270) * baseSize;
        vertices[vIndex1] = position + GetQuaternionEuler(rotation - 180) * baseSize;
        vertices[vIndex2] = position + GetQuaternionEuler(rotation - 90) * baseSize;
        vertices[vIndex3] = position + GetQuaternionEuler(rotation - 0) * baseSize;
    }

    //Relocate UVs
    uvs[vIndex0] = new Vector2(uv00.x, uv11.y);
    uvs[vIndex1] = new Vector2(uv00.x, uv00.y);
    uvs[vIndex2] = new Vector2(uv11.x, uv00.y);
    uvs[vIndex3] = new Vector2(uv11.x, uv11.y);

    if (color.HasValue)
    {
        // Set vertex colors
        colors[vIndex0] = color.Value;
        colors[vIndex1] = color.Value;
        colors[vIndex2] = color.Value;
        colors[vIndex3] = color.Value;
    }

    //Create triangles
    int tIndex = index * 6;

    triangles[tIndex + 0] = vIndex0;
    triangles[tIndex + 1] = vIndex3;
    triangles[tIndex + 2] = vIndex1;

    triangles[tIndex + 3] = vIndex1;
    triangles[tIndex + 4] = vIndex3;
    triangles[tIndex + 5] = vIndex2;
}




I think this is some sort of clue, but I’m not sure what just yet… it appears I have seams, or that the UVs are off somehow. This image shows what I’m talking about. You can see that the first top left and then top middle have a gap… and that the middle one’s UVs look just slightly shifted than the ones to its left and right. However, when I check its UVs, it’s the same as the other ones, and there’s no discrepancies in its position or triangles either.

I took the mesh totally out of it and made a game object with the sprite… the issue reproduced. I then started playing around with the game object’s position, and based on the position, it renders correctly, so I’m now thinking maybe it’s something to do with my camera… however, I had set up the camera’s size based on my standard PPU of 16 and my vertical resolution… e.g. 240 / 16 / 2 = 7.5 for my camera’s “Size” value. If the camera’s Size is set to 1, it doesn’t look like I have this issue, but then obviously my scaling is way off.

Hmm, so for some reason, using the Pixel Perfect Camera fixes this issue… even though it gives me the same Size. Although, if I don’t use Crop Frame, it has a size of 9.9375. I definitely don’t understand that, but it seems to work for now.