Will graphics be pixel perfect scaled, if an image gets scaled DOWN by an integer?

jobjorgos

Member
I know that scaling graphics up in a game should always be done by multiplying it with an integer number such as 2 and not a number such as 1.43 or 2.5 to keep the quality.

But now I wonder, how does this work when scaling graphics DOWN by an integer? I have a 1920x1080 room background that I want to be scaled down by 2 so it becomes 960x540, will this be scaled down pixel perfect? And if its true, is scaling down then not better than scaling up so there is a higher base resolution?
 

JackTurbo

Member
If you're talking about pixel art then you'll be loosing random pixels which will likely ruin your art.

If you're talking about hires raster art then pixel perfect doesn't really matter.

If however you're talking about scaling up pixel art less in some instances than on other that's going to be fine. By that I mean if in most of your scenes you have each pixel art pixel made up of say 4 display pixels, but in another scene you want a further away view so instead of 1:4 you do 1:2 or something this would make your sprites smaller than usual but would still be scaled up.
 

jobjorgos

Member
If you're talking about pixel art then you'll be loosing random pixels which will likely ruin your art.
yep im talking about pixel art. Okay so ill be loosing random pixels when scaling it down? are you sure about that? because if scaling it up by 2 it does not lose random pixels. is there a difference between scaling up and down?
 
yep im talking about pixel art. Okay so ill be loosing random pixels when scaling it down? are you sure about that? because if scaling it up by 2 it does not lose random pixels. is there a difference between scaling up and down?
How do you fit 4 liters of water into a 1 liter bottle? You can't; it's physically impossible. Similarly, you can't display ~2m pixels of information (1080p) on a resolution of ~518k pixels (540p). 3/4 pixels will have to get tossed out. Which ones get removed depends on hardware.
 

JackTurbo

Member
yep im talking about pixel art. Okay so ill be loosing random pixels when scaling it down? are you sure about that? because if scaling it up by 2 it does not lose random pixels. is there a difference between scaling up and down?
When you scale up pixel art by an integer value, each pixel of the original image is represented by a square of pixels, a 2 by 2 block if you doubled in size, a three by three square of you tripled the size etc.

If you display a pixel art sprite at half its native resolution then the computer has to do a similar thing but in reverse. It has to take a 2by2 section of the pixel art and represent it using a single pixel of the display. A single pixel of the display can only be a single colour, so it has to pick one of the four pixels to display and discard the other three if interpolation is off. Or it will display the average colour of the four pixels if interpolation is on.

Either way data is lost.

Think of your monitor like a mosaic of square tiles and a pixel art sprite as an design made up of single tiles. You can make that design bigger by using square groups of tiles (2by2, 3by3 etc) instead of individual tiles, but you can't make that same design smaller.
 
Last edited:

jobjorgos

Member
If you display a pixel art sprite at half its native resolution then the computer has to do a similar thing but in reverse. It has to take a 2by2 section of the pixel art and represent it using a single pixel of the display. A single pixel of the display can only be a single colour, so it has to pick one of the four pixels to display and discard the other three if interpolation is off. Or it will display the average colour of the four pixels if interpolation is on.
Ahh I understand all of it now, very nice explaination, thanks for that!
 
Top