Page 1 of 1

How to get my sprites to have good antialiasing on rotation?

PostPosted: Sun Oct 19, 2014 12:40 pm
by Leaufai
When I make my sprites rotate, they get jagged edges. Is it possible to fix this? This is what it looks like now:

Image

Re: How to get my sprites to have good antialiasing on rotat

PostPosted: Sun Oct 19, 2014 1:36 pm
by eli0s
The truth is that with in the editor there is some antialiasing that isn't applied when previewing in the browsers. Hadn't really noticed that before!

Re: How to get my sprites to have good antialiasing on rotat

PostPosted: Sun Oct 19, 2014 2:09 pm
by Ashley
It looks like you've filled the images right to the edges. Hit 'crop' in the image editor and it adds a 1px transparent border around the edge. That allows for soft-edged blending along the image edges. Note that is not antialiasing, it's just linear sampling along the edge, but it looks similar and is far faster than an expensive fullscreen antialiasing effect.

Re: How to get my sprites to have good antialiasing on rotat

PostPosted: Sun Oct 19, 2014 2:25 pm
by eli0s
That did the trick! Nice one, thanks @Ashley !

Re: How to get my sprites to have good antialiasing on rotat

PostPosted: Sat Nov 08, 2014 3:17 pm
by KojotSan
I was having similar problem in my project. However, the solution solved my problem to achieve linear edges on pre-maid sprites - which is great :), i still got hard pixel steps on images that I loaded to the sprite on the go from the web :( . Is there any way to change sprite canvas size to add 1 transparent px on each side after loading an external image?

Re: How to get my sprites to have good antialiasing on rotat

PostPosted: Sat Nov 08, 2014 5:27 pm
by Ashley
@KojotSan - no, you should just add the 1px border on the loaded images as well.

Re: How to get my sprites to have good antialiasing on rotat

PostPosted: Mon Nov 10, 2014 12:30 am
by KojotSan
I see... in that case I cover loaded images with additional pre-made frame sprite. It covers rough lines and gives better look :)

Thx for reply Ashley! Regards!