0
\$\begingroup\$

I want to use the Sprite Atlas in Unity for enhanced rendering performance, but everytime I try to pack sprites into the atlas they appear with severe artifacts.

enter image description here

As you can see, there are blocks of black pixels that appear that aren't supposed to be there. Here is what the gun should look like:

enter image description here

Here are all my settings for the sprites and atlas:

enter image description here

enter image description here

How can I prevent these artifacts from appearing?

\$\endgroup\$
3
  • \$\begingroup\$ This looks like optimization for compression, by allowing texel values to repeat outside the region encompassed by the sprite's mesh (so in theory, these texels should never be rendered in-game). Are these artifacts visible on the sprites in-game, or only when you inspect the atlas itself? If you're seeing them in-game, can you show us details of how you're drawing your sprites? That might give some clues about where the assumption that these pixels are out of the displayed area might be getting broken. \$\endgroup\$
    – DMGregory
    Jun 27, 2019 at 17:11
  • \$\begingroup\$ Interesting. There are no artifacts in-game, only the when doing the pack preview. Thats helpful to know, thanks! \$\endgroup\$
    – Scooter
    Jun 29, 2019 at 14:18
  • \$\begingroup\$ @FaTalCubez I noticed the same and yes, artifacts didn't appear in the game. Since there is no real issue, consider writing your own answer and choosing it to mark this question solved. (DMGregory explained most of it, so there is not much to add besides maybe linking to an article on the subject) \$\endgroup\$
    – hsandt
    May 31, 2020 at 11:22

0

You must log in to answer this question.

Browse other questions tagged .