Camera / Graphic bug with 2D Sprites [Please help me solve this]

There’s a bug in my game i cannot figure out how to solve. It looks like a graphic bug and i don’t know how to fix it, i tried changing Anti-aliasing off, and all of that, still doesn’t work. I assume its the camera now, but i want help. The code and images plus a video are below.

I don’t understand it, you can see the graphic settings, and the pixel tearing. Somehow the grass doesn’t do it, but the dirt does. So far it’s layer, because I’m using unity’s Tile map system. Here’s the video.
- YouTube and here’s the code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Camera_Controller : MonoBehaviour {

    public float moveSpeed;
    public GameObject camTarget;
    private Vector3 Targetpos;

    private static bool exists;

    public BoxCollider2D bounds;
    private Vector3 minBounds;
    private Vector3 maxBounds;

    private Camera cam;
    private float halfWidth;
    private float halfHeight;

    private void Start()
    {
        DontDestroyOnLoad(transform.gameObject);
        
        if (!exists)
        {
            exists = true;
            DontDestroyOnLoad(transform.gameObject);
        }
        else
        {
            Destroy(gameObject);
        }

        moveSpeed = 5f;

        camTarget = GameObject.FindGameObjectWithTag("Player");
        cam = gameObject.GetComponent<Camera>();
        bounds = GameObject.FindGameObjectWithTag("WorldBounderies").GetComponent<BoxCollider2D>();

        minBounds = bounds.bounds.min;
        maxBounds = bounds.bounds.max;

        halfHeight = cam.orthographicSize;
        halfWidth = halfHeight * Screen.width / Screen.height;
    }

    private void Update()
    {

       if (camTarget == null)
        {
            camTarget = GameObject.FindGameObjectWithTag("Player");
        }
        if (bounds == null)
        {
            bounds = GameObject.FindGameObjectWithTag("WorldBounderies").GetComponent<BoxCollider2D>();
        }

        Targetpos = new Vector3(camTarget.transform.position.x, camTarget.transform.position.y, 0f);
        transform.position = Vector3.Lerp(transform.position, Targetpos, moveSpeed * Time.deltaTime);
        
        float clampX = Mathf.Clamp(transform.position.x, minBounds.x + halfWidth, maxBounds.x - halfWidth);
        float clampY = Mathf.Clamp(transform.position.y, minBounds.y + halfHeight, maxBounds.y - halfHeight);
        transform.position = new Vector3(clampX, clampY, transform.position.z);
    }

    public void SetBounds(BoxCollider2D newBounds)
    {
        bounds = newBounds;

        minBounds = bounds.bounds.min;
        maxBounds = bounds.bounds.max;
    }
}

Hi,

On the png file for your dirt texture.
If you click on that you should get import settings.

Try setting the following.

Bit maps: off
Filter Mode: Point

Could you also send a screen shot of these settings?

I don’t have a solution for you, but I can help you understand how to debug this issue a bit.
Try to create a scene file which has the minimum number of things loaded needed to reproduce the error. This can help give you insight, and better make your case for bugs. It can also give you a safe place to explore the issue. You need to be able to change things without being afraid you’ll mess up your game.
Good Luck

I am not sure but I saw something like this when I was creating a endless runner and repeated same image, because both images were joined very closely I could see gaps, I overlapped those images.
Just trying to help may not be relevant.

Hi @memeinaction

For starters, take maybe four tiles (with biggest difference in their color palette), then add 2-8 pixels of padding around each tile graphic.

Then import these to Unity, create a temporary test map out of them.

Then see if you still get color bleed.

It’s most likely from neighbor tiles in (texture)map / source image itself, but there might be other reasons for this too.

Here is one tutorial explaining the basic reason: Unity - Fixing Gaps Between Tiles - YouTube