# Pixel perfect sprites?

**URL:** <https://forum.babylonjs.com/t/pixel-perfect-sprites/38125>\
**Category:** Questions\
**Tags:** sprite\
**Created:** [February 12, 2023, 9:32am UTC](https://forum.babylonjs.com/t/pixel-perfect-sprites/38125 "2023-02-12T09:32:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pixelodo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pixelodo/32/29875_2.png) [@Pixelodo](https://forum.babylonjs.com/u/Pixelodo)\
**Post date:** [February 12, 2023, 9:32am UTC](https://forum.babylonjs.com/t/pixel-perfect-sprites/38125/1 "2023-02-12T09:32:21Z")

</div>

Does Babylon have something equivalent to Unity’s Pixel Perfect Camera?  
[https://docs.unity3d.com/Packages/com.unity.2d.pixel-perfect@1.0/manual/index.html](https://docs.unity3d.com/Packages/com.unity.2d.pixel-perfect@1.0/manual/index.html)

Using SpriteManager I can get close with Texture.NEAREST\_SAMPLINGMODE but it’s not pixel perfect.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 13, 2023, 10:48am UTC](https://forum.babylonjs.com/t/pixel-perfect-sprites/38125/2 "2023-02-13T10:48:43Z")

</div>

Welcome aboard!

I don’t think we have something like that, but if you can explain what it should do maybe we can find a way (I must say I didn’t understand what is the purpose of pixel perfect mode from the Unity’s docs…).

---

<div class="post-metadata">

**Author:** ![Pixelodo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pixelodo/32/29875_2.png) [@Pixelodo](https://forum.babylonjs.com/u/Pixelodo)\
**Post date:** [March 8, 2023, 3:51am UTC](https://forum.babylonjs.com/t/pixel-perfect-sprites/38125/3 "2023-03-08T03:51:26Z")

</div>

Thanks!  
So the pixel perfect camera ensures that there’s no artifacts in sprites no matter the resolution.

I have a pixel art sprite that when animated has noticeable artifacts. Any way to have a sprite output to the screen as if it was upscaled with absolutely no filtering?

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [March 8, 2023, 10:16am UTC](https://forum.babylonjs.com/t/pixel-perfect-sprites/38125/4 "2023-03-08T10:16:54Z")

</div>

I guess I would need to see side by side a pixel perfect / not perfect sprite to understand what it’s supposed to do. Maybe others have a more clearer view than me about how this feature should be implemented?

---

<div class="post-metadata">

**Author:** ![Pixelodo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pixelodo/32/29875_2.png) [@Pixelodo](https://forum.babylonjs.com/u/Pixelodo)\
**Post date:** [March 10, 2023, 3:48am UTC](https://forum.babylonjs.com/t/pixel-perfect-sprites/38125/5 "2023-03-10T03:48:19Z")

</div>

I will put a small example together eventually but this describes the problem in depth:

> **[Pixel Art Filtering | Joren's](https://jorenjoestar.github.io/post/pixel_art_filtering/)**
>
> An example of non integer scaling of pixel art. Overview Pixel art is living a beautiful renaissance these last years, with more and more studios embracing its visuals and more artists going back to this unique way of describing visuals in a...

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [March 17, 2023, 12:50pm UTC](https://forum.babylonjs.com/t/pixel-perfect-sprites/38125/6 "2023-03-17T12:50:20Z")

</div>

Closing this thread in favor of [Sprite pixel art artifact issue?](https://forum.babylonjs.com/t/sprite-pixel-art-artifact-issue/39123)

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [March 17, 2023, 12:50pm UTC](https://forum.babylonjs.com/t/pixel-perfect-sprites/38125/7 "2023-03-17T12:50:25Z")

</div>

Closed on March 17, 2023, 12:50pm UTC


