Scaling Sprites
Posted: Thu Mar 26, 2009 4:26 am
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:
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.
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:
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.