2D Toolkit Forum

2D Toolkit => Support => Topic started by: radu on December 23, 2014, 06:18:50 pm

Title: Scaling artifacts with camera x2
Post by: radu on December 23, 2014, 06:18:50 pm
I'm getting some strange scaling artifacts - see image
(http://i.imgur.com/YHolIOY.png)

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)
Title: Re: Scaling artifacts with camera x2
Post by: unikronsoftware 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.