# White border around 2D Texture / Sprite

**URL:** <https://forums.unrealengine.com/t/white-border-around-2d-texture-sprite/1248223>\
**Category:** Asset Creation\
**Tags:** unreal-engine, Rendering, question\
**Created:** [August 2, 2023, 12:26pm UTC](https://forums.unrealengine.com/t/white-border-around-2d-texture-sprite/1248223 "2023-08-02T12:26:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bojann](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bojann/32/906560_2.png) [@Bojann](https://forums.unrealengine.com/u/Bojann)\
**Post date:** [August 2, 2023, 12:26pm UTC](https://forums.unrealengine.com/t/white-border-around-2d-texture-sprite/1248223/1 "2023-08-02T12:26:37Z")

</div>

Hello, I have downloaded free texture from the internet, edited it a bit and imported in my UE5. Now, my sprite has white border around, which is really strange and iritating. And I cannot resolve it. I tried the same texture in UE4, and all works fine. Image below:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/7/5/875bf328b91e58ef7ed678272be556dda6c6f59e.png)

It happens to almost any PNG image I import. Here is another example

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/f/9/9f9ca47390e16bafc7774aa2b0fb0ec45f79cdfb.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/9/e19d1450821676464e36b156b2ccec08f62e5e52.jpeg)

Now to give a bit more info.  
My Workflow:

1. Import the texture
2. Right Click → Apply Papper 2D Settings
3. Change texture group to UI because I don’t want to use Pixel art.

What I tried to fix the issue:

- Changing Filter to Nearest fixes the issue, but I don’t want Pixel art game, so this is not good for me. This also causes texture jittering when character is moving.
- Changing tiling mode to Clamp didn’t work
- Tried playing with all compression options, still no luck
- Tried to add the outer glow to my texture, which did fix things a bit, but still there was an issue as now glow line colors moved to another place.

And finally here is the original image, so you can download it, and try it out yourself. It is [free image](https://www.gamedeveloperstudio.com/graphics/viewgraphic.php?page-name=Animated-floor-spikes-game-asset&item=1u5v5h4w8i7s7t806o), so I am allowed to share it here.  
 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/5/a/55a0553f77af3f9a468d7007aebe884041dcb574.png)  
Any help is appreciated

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [August 2, 2023, 1:10pm UTC](https://forums.unrealengine.com/t/white-border-around-2d-texture-sprite/1248223/2 "2023-08-02T13:10:01Z")

</div>

How is this:

![test2_8](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/d/97d9df3dffe3969ece42b38cfcffe41828982e47.png)

If you set it to `UserInterface2D` compression

---

<div class="post-metadata">

**Author:** ![Bojann](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bojann/32/906560_2.png) [@Bojann](https://forums.unrealengine.com/u/Bojann)\
**Post date:** [August 2, 2023, 1:13pm UTC](https://forums.unrealengine.com/t/white-border-around-2d-texture-sprite/1248223/3 "2023-08-02T13:13:07Z")

</div>

Thanks for your answer. Actually that was my original compression settings, as you can see in this screenshot. And issue is still the same

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/a/7/ca7e66e1714feb4de785312d1d6be01c2ed8d14f.png)

Can you share exact workflow? Maybe you did something else I havent.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [August 2, 2023, 1:14pm UTC](https://forums.unrealengine.com/t/white-border-around-2d-texture-sprite/1248223/4 "2023-08-02T13:14:07Z")

</div>

Is the image **I** posted looking OK on your end?

---

<div class="post-metadata">

**Author:** ![Bojann](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bojann/32/906560_2.png) [@Bojann](https://forums.unrealengine.com/u/Bojann)\
**Post date:** [August 2, 2023, 1:18pm UTC](https://forums.unrealengine.com/t/white-border-around-2d-texture-sprite/1248223/5 "2023-08-02T13:18:58Z")

</div>

Yes, actually it does. Even in the gameplay. But what did you do with the PNG itself? How did you change it?

Thanks a lot man!

---

<div class="post-metadata">

**Author:** ![Bojann](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bojann/32/906560_2.png) [@Bojann](https://forums.unrealengine.com/u/Bojann)\
**Post date:** [August 2, 2023, 1:22pm UTC](https://forums.unrealengine.com/t/white-border-around-2d-texture-sprite/1248223/6 "2023-08-02T13:22:34Z")

</div>

Btw. I literraly tried to draw a black circle using Pen in Photosho, and when I imported it, it also had white borders.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/7/b/47b4b46b55573ed9b8da971dda4ba8142456c5f6.png)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [August 2, 2023, 1:23pm UTC](https://forums.unrealengine.com/t/white-border-around-2d-texture-sprite/1248223/7 "2023-08-02T13:23:05Z")

</div>

> [@Bojann](#):
>
> But what did you do with the PNG itself? How did you change it?

I don’t know _why_ UE5 treats them weirdly, I lack the technical know-how. But I did run into this once or twice in UE4. My solution back then was to save with 8-bit depth, which worked fine for the assets I needed:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/9/2/492d18443d2847f684ac9b87d01dada4bf2140ea.png)

- here, courtesy of [paint.net](https://www.getpaint.net/) but any software should be able to do it

* * *

I’d like to blame engine filtering method but I really do not know enough to be confident about it.

---

<div class="post-metadata">

**Author:** ![Bojann](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bojann/32/906560_2.png) [@Bojann](https://forums.unrealengine.com/u/Bojann)\
**Post date:** [August 2, 2023, 2:24pm UTC](https://forums.unrealengine.com/t/white-border-around-2d-texture-sprite/1248223/8 "2023-08-02T14:24:02Z")

</div>

Thanks a lot for your help @Everynone !!! You literally saved me. I was trying to resolve this one UE end for almost a week.

In case anyone else needs to do the same thing from the Photoshop, what I did, and it worked is to use, in the menus Image → Mode → Indexed Color, and then it started working for me. Using Only 8 bit on default Color setting did not work for me at all.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [September 1, 2023, 2:24pm UTC](https://forums.unrealengine.com/t/white-border-around-2d-texture-sprite/1248223/9 "2023-09-01T14:24:47Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
