# White border artifact around alpha in imported texture (only on linear filtering)

**URL:** <https://forums.unrealengine.com/t/white-border-artifact-around-alpha-in-imported-texture-only-on-linear-filtering/1725>\
**Category:** Asset Creation\
**Tags:** unreal-engine\
**Created:** [April 3, 2014, 6:31am UTC](https://forums.unrealengine.com/t/white-border-artifact-around-alpha-in-imported-texture-only-on-linear-filtering/1725 "2014-04-03T06:31:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antares](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Antares](https://forums.unrealengine.com/u/Antares)\
**Post date:** [April 3, 2014, 6:31am UTC](https://forums.unrealengine.com/t/white-border-artifact-around-alpha-in-imported-texture-only-on-linear-filtering/1725/1 "2014-04-03T06:31:15Z")

</div>

Hi Guys,

I have a strange problem on an imported UI texture, when using linear filter there is a white line artifact on the frontier of the texture and alpha.

I have try every option including preserve border, but the only thing that change that is to desactivate filtering.

Maybe it is a bug or something ?

Linear Filtering With Artifact :  
 ![textureLinear.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/4/0/f40f4d5dfc0902d14a60fbcdad7023c02fb75b9e.jpeg)

Nearest Filtering Without Artifact :  
 ![textureNearest.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/5/2/25247b7444a0a9e8261cb63cfc694120841ec63c.jpeg)

Thanks for your help

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a2ec11f5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a2ec11f5](https://forums.unrealengine.com/u/anonymous_user_a2ec11f5)\
**Post date:** [April 3, 2014, 7:07am UTC](https://forums.unrealengine.com/t/white-border-artifact-around-alpha-in-imported-texture-only-on-linear-filtering/1725/2 "2014-04-03T07:07:13Z")

</div>

My guess would be that the engine is expecting textures with pre-multiplied alphas. Your transparent pixels are probably white instead of black (as they would be if they were pre-multiplied) so the white gets blended in at the edges to create fringes like that.

---

<div class="post-metadata">

**Author:** ![Hourences2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hourences2](https://forums.unrealengine.com/u/Hourences2)\
**Post date:** [April 3, 2014, 7:29am UTC](https://forums.unrealengine.com/t/white-border-artifact-around-alpha-in-imported-texture-only-on-linear-filtering/1725/3 "2014-04-03T07:29:25Z")

</div>

How does the texture look without alpha? What is the background color where the alpha is black?

Try to set it to clamp also instead of wrap. Always good for UI things.

---

<div class="post-metadata">

**Author:** ![Antares](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Antares](https://forums.unrealengine.com/u/Antares)\
**Post date:** [April 3, 2014, 7:36am UTC](https://forums.unrealengine.com/t/white-border-artifact-around-alpha-in-imported-texture-only-on-linear-filtering/1725/4 "2014-04-03T07:36:27Z")

</div>

Hi,

EDIT: That was the wrong texture (updated)  
Thanks for anwser, here is my picture that I use : [http://prntscr.com/36kll0](http://prntscr.com/36kll0)

Will take a look about the color of pixel that is alpha, don’t know that there is a difference

---

<div class="post-metadata">

**Author:** ![Antares](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Antares](https://forums.unrealengine.com/u/Antares)\
**Post date:** [April 3, 2014, 7:54am UTC](https://forums.unrealengine.com/t/white-border-artifact-around-alpha-in-imported-texture-only-on-linear-filtering/1725/5 "2014-04-03T07:54:40Z")

</div>

Well sorry for double post, I have set pixel to black in the alpha zone, and looks like it is okay =)

Thanks for the help ! (very quick indeed)

---

<div class="post-metadata">

**Author:** ![Hourences2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hourences2](https://forums.unrealengine.com/u/Hourences2)\
**Post date:** [April 3, 2014, 11:36am UTC](https://forums.unrealengine.com/t/white-border-artifact-around-alpha-in-imported-texture-only-on-linear-filtering/1725/6 "2014-04-03T11:36:50Z")

</div>

Yes always make sure the pixels are not white, and preferably not black either. Use a darker tint of the average color in the image as background.

---

<div class="post-metadata">

**Author:** ![Antares](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Antares](https://forums.unrealengine.com/u/Antares)\
**Post date:** [April 3, 2014, 12:01pm UTC](https://forums.unrealengine.com/t/white-border-artifact-around-alpha-in-imported-texture-only-on-linear-filtering/1725/7 "2014-04-03T12:01:04Z")

</div>

So I cannot just export as alpha pre-multiplied png ? Try this it work pretty well, I suppose I got this artifact because of the bilinear filtering taking two value one with alpha = 1.0 and a color and the other with alpha = 0.0 and white.

---

<div class="post-metadata">

**Author:** ![the\_nikola](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@the\_nikola](https://forums.unrealengine.com/u/the_nikola)\
**Post date:** [March 4, 2017, 4:14pm UTC](https://forums.unrealengine.com/t/white-border-artifact-around-alpha-in-imported-texture-only-on-linear-filtering/1725/8 "2017-03-04T16:14:14Z")

</div>

Hello, I have the same problem, but setting to neither black nor white would work, because the game is only black and white and it would always show :I

---

<div class="post-metadata">

**Author:** ![the\_nikola](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@the\_nikola](https://forums.unrealengine.com/u/the_nikola)\
**Post date:** [March 4, 2017, 4:25pm UTC](https://forums.unrealengine.com/t/white-border-artifact-around-alpha-in-imported-texture-only-on-linear-filtering/1725/9 "2017-03-04T16:25:30Z")

</div>

Found it. In textures set tiling to Clamp instead of Wrap or Mirror

---

<div class="post-metadata">

**Author:** ![jwatte](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jwatte/32/744941_2.png) [@jwatte](https://forums.unrealengine.com/u/jwatte)\
**Post date:** [March 4, 2017, 5:23pm UTC](https://forums.unrealengine.com/t/white-border-artifact-around-alpha-in-imported-texture-only-on-linear-filtering/1725/10 "2017-03-04T17:23:09Z")

</div>

Alpha in PNG is unfortunately a trash fire of incompatibility and has been for a long time. The implementation choices are not very useful for games ☹  
You need to use TGA, or PSDs straight out of Photoshop, if you want to have correct control of alpha/color values.
