Hello Guest

Author Topic: Scaling artifacts with camera x2  (Read 2972 times)

radu

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Scaling artifacts with camera x2
« on: December 23, 2014, 06:18:50 pm »
I'm getting some strange scaling artifacts - see image


Left is with artifacts, right is normal. Most of the time the sprite is displayed properly, except every once in a while this happens.

I'm using a 2x camera. It doesn't matter if the 2x is made via pixels per meter or zoom factor, the same problem occurs.


Am I missing something?

(this shouldn't matter, but what you see is actually 4 sprites: yellow robe, brown accent, black parts, yellow eyes; also, there is a two-frame animation for all these parts - that's why they don't look exactly the same left and right)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Scaling artifacts with camera x2
« Reply #1 on: December 23, 2014, 06:55:20 pm »
Add some padding (1 pixel should suffice). It looks like adjacent pixels are creeping through due to floating point precision.