Scaling Sprites

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
RazputinOleander
Prole
Posts: 1
Joined: Thu Mar 26, 2009 4:16 am

Scaling Sprites

Post by RazputinOleander »

Hi all, sorry if this question is a repeat, but a quick search didn't turn up any relevant results.

I'm using a low-resolution sprite: a 9px by 9px image with frames 1px wide by 9px high. It works wonderfully when I leave it as-is, except that it's tiny as heck. I'd like to scale this sprite up about ten times for regular playback. I can do this, however; there's some kind of filtering happening on the sprite texture, causing pixel interpolation. I'd like to do the equivalent of GL_NEAREST.

Here's a screenshot:

Image

By comparison, here's the source image, so you can see the frames that should be rendered. Note: I've upscaled the source sprite about 10 times and exported as .jpg. Normally it's .png.

Image
User avatar
Kaze
Party member
Posts: 189
Joined: Sat Jul 19, 2008 4:39 pm
Location: Dublin, Ireland

Re: Scaling Sprites

Post by Kaze »

Post Reply

Who is online

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