1
\$\begingroup\$

Suppose that I have two images of equal size. They both contain a square:

When overlapped, both squares will appear next to each other.

If both images use Point (no filter), they will contact without issues regardless of the amount of zoom or scale:

enter image description here

If you use either Bilinear or Trilinear, there will be an artifact visible in certain zoom/scale levels:

enter image description here

Of course, that is to be expected from the very nature of the filters. As much as I would like to just leave it at Point (no filter), my game looks far better using Trilinear instead - except of course, for the "borders" or points of contact.

The ideal scenario for me as bizarre as it may sound, is to be able to use Trilinear filtering generally, but force the "outlines" of my sprites to stay as if they were Point (no filter). This way, my game looks painterly when zoomed in/out (the game isn't pixel art), and I also avoid the "glitch" in specific contacts.


  • Yes, the glitch is only noticeable if you use a scale/zoom that is higher than 100%. Unfortunately, due to the nature of the game, the player should be able to zoom in/out if they desire, so I can't just pick "the" ideal camera size or sprite scale because it can't be constant.

  • I've tried using Canvas and its Pixel Perfect checkbox to no avail. I didn't really expect that to work though.


What can I do to achieve the desired effect, then?

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.