- Home /
[2D graphical bug] Sprite Edge blends. Why this is happening?
Why this is happening??? x( I'm using spritesheets and the seperate sprites's edge bledn tougether. Not a unit of a line, only one pixel of it. You can clearly see it on the images. If you zoom the image to original size, its much more clearly visible. if im thinking right, the line is not random. It only happens, if in the spritesheet, the sprite under the current sprite has a content in the first row pixels, for some reasons it blends with the sprite... Here is an explonation about my thoughts: http://imgur.com/nPoL1Pn
http://imgur.com/XB6vapp
http://imgur.com/N5fbamQ
Why does this happen? How should I fix this?
Answer by CameronPenner · Oct 29, 2015 at 07:52 PM
Set the "Wrap Mode" on your texture to "Clamp".
This will stop Unity sampling from the other side of the texture when it's drawing edges that are smaller than a pixel.
I have similarly tried using the sprite editor with a sprite I have in a sprite sheet, with no visible visual glitches, and when I look at the game in the game after putting it through Unity's sprite editor and cutting it up accordingly, it has a couple pixels that randomly appear as the edge of the sprite as it's animation.
And I have set it to Clap when going through this.
So, any other ideas as to what might be causing this issue and how to fix it?
Edit: I noticed it was because Unity hadn't cut up the sprite perfectly so the boxes for each splice were just a tiny bit off. I moved each of them into the right place and the issue was resolved. Looks like I just need to be really careful about the exact resolution numbers I use for my sprites and probably also the amount per unit I set when loading the sprite into Unity initially too.
Your answer
Follow this Question
Related Questions
Gui Box - Texture - Spritesheet 0 Answers
Lines appear between sprites from sprite sheets 7 Answers
Sprite texture incorrect 0 Answers
Sprite Previews not displaying! 0 Answers