# Texture, nearest neighbour filtering?

**URL:** <https://forums.unrealengine.com/t/texture-nearest-neighbour-filtering/284135>\
**Category:** Rendering\
**Tags:** unreal-engine, pixel, question\
**Created:** [May 24, 2014, 12:20pm UTC](https://forums.unrealengine.com/t/texture-nearest-neighbour-filtering/284135 "2014-05-24T12:20:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Traggey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Traggey](https://forums.unrealengine.com/u/Traggey)\
**Post date:** [May 24, 2014, 12:20pm UTC](https://forums.unrealengine.com/t/texture-nearest-neighbour-filtering/284135/1 "2014-05-24T12:20:16Z")

</div>

So, quite a simple thing to do, I just can not for the love of me find where.

I’ve got a very small pixel art texture, default texture filtering causes a blurry mess, where would I change the texture filtering to nearest neighbour? I can not find any such options within the imported texture itself.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d318e90c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d318e90c](https://forums.unrealengine.com/u/anonymous_user_d318e90c)\
**Post date:** [May 24, 2014, 10:02pm UTC](https://forums.unrealengine.com/t/texture-nearest-neighbour-filtering/284135/2 "2014-05-24T22:02:19Z")

</div>

Was looking for it too… It’s sort of hidden here in the texture tab under advanced settings:

---

<div class="post-metadata">

**Author:** ![Traggey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Traggey](https://forums.unrealengine.com/u/Traggey)\
**Post date:** [May 25, 2014, 9:46am UTC](https://forums.unrealengine.com/t/texture-nearest-neighbour-filtering/284135/3 "2014-05-25T09:46:54Z")

</div>

There we go, thanks a bunch!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_63900633](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_63900633](https://forums.unrealengine.com/u/anonymous_user_63900633)\
**Post date:** [December 1, 2015, 3:40pm UTC](https://forums.unrealengine.com/t/texture-nearest-neighbour-filtering/284135/4 "2015-12-01T15:40:11Z")

</div>

mm interesting, thanks!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e10a6464](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e10a6464](https://forums.unrealengine.com/u/anonymous_user_e10a6464)\
**Post date:** [October 15, 2016, 9:15pm UTC](https://forums.unrealengine.com/t/texture-nearest-neighbour-filtering/284135/5 "2016-10-15T21:15:10Z")

</div>

How do I set this in C++ code? I used UTexture2D::CreateTransient() to create a texture in C++ code. So how do I either tell my C++ texture to :“use nearest” or at least tell it to copy the settings (including filter = nearest) from a texture that I setup in the editor?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e10a6464](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e10a6464](https://forums.unrealengine.com/u/anonymous_user_e10a6464)\
**Post date:** [October 15, 2016, 9:18pm UTC](https://forums.unrealengine.com/t/texture-nearest-neighbour-filtering/284135/6 "2016-10-15T21:18:42Z")

</div>

Actually I found it. UTexture2D’s parent class UTexture has Filter. So…

tex-\>Filter = TextureFilter::TF\_Nearest;

---

<div class="post-metadata">

**Author:** ![SlaxX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SlaxX](https://forums.unrealengine.com/u/SlaxX)\
**Post date:** [July 27, 2020, 6:05am UTC](https://forums.unrealengine.com/t/texture-nearest-neighbour-filtering/284135/7 "2020-07-27T06:05:08Z")

</div>

If anyone lands here realizing the menu changed,  
the new way seems to be to set the Texture Group to “2D Pixels” under Level of Detail.

![308226-screenshot-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/c/6/5c6db337707ef1aeaa752a35feebad254d79270a.png)

---

<div class="post-metadata">

**Author:** ![Luiz\_Reinoso](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/luiz_reinoso/32/613217_2.png) [@Luiz\_Reinoso](https://forums.unrealengine.com/u/Luiz_Reinoso)\
**Post date:** [January 18, 2023, 6:13pm UTC](https://forums.unrealengine.com/t/texture-nearest-neighbour-filtering/284135/8 "2023-01-18T18:13:48Z")

</div>

WORK!

See how my game was with the default filter:

 ![2023-01-17_12-02-30](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/2/6/f2627d814cbe0a3cefb2dd90b7dad026a25125c1.jpeg)  
Now with the “Nearest” filter:  
 ![2023-01-17_12-25-329](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/6/d/16dbee0477998116085cfa834f740f21c48cce61.gif)  
I was looking for the solution for 2D games, this topic helped a lot! In addition, the same fix applies to HUDs in Pixel Art.
