Scaling + Tiled Spritesheet = Seams?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
racarate
Prole
Posts: 34
Joined: Wed May 02, 2012 12:37 pm

Scaling + Tiled Spritesheet = Seams?

Post by racarate »

Hi everyone,

I'm trying to display a 32x32 sprite at double width. Note that this sprite comes from a 2x2 spritesheet. I am using AnAL, and when I pass a scale value (which just passes through to love.graphics.draw) I get visible seams. This doesn't happen at all at normal scale! Is there some limitation to scaling images if those images come from a tiled spritesheet?
Attachments
double_size.png
double_size.png (9.61 KiB) Viewed 2001 times
original_size.png
original_size.png (7.2 KiB) Viewed 2001 times
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Scaling + Tiled Spritesheet = Seams?

Post by Jasoco »

You're scaling the image. It's best to scale to a whole number AND use nearest neighbor filtering. The artifacts are parts of the other adjacent tiles. They won't appear with nearest neighbor.

Look up setFilter().
User avatar
racarate
Prole
Posts: 34
Joined: Wed May 02, 2012 12:37 pm

Re: Scaling + Tiled Spritesheet = Seams?

Post by racarate »

Ok, thanks for the help. Setting "nearest" fixed it right up!


-Nick
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 5 guests