Struggling with graphics for a pixel art sprite

The reason it looks weird with the zoom set to 1.7 is because that means that the nearest filtering will not produce pixels of equal size (as i*1.7 can round either up or down), so some pixels are larger than others, which is why one of her eyes looks smaller than the other. So if you use nearest pixels and and want equally sized pixels, your zoom must be a whole number, like 1, 2, 3, or 4.

Keep in mind that if you use fit or stretch projection, then the player resizing the window or using fullscreen will most likely not set the zoom to a whole number, so you would need to use fixed projection, and set the zoom depending on window size manually.

The only ways to use floating point numbers as zoom with equal pixel size is to write a custom render script, maybe even with custom shaders, or to use linear scaling and to deal with the blurriness in some other way.

Unfortunately Defold is focused on smooth drawn art, and for pixel art you have to work against the default renderer a bit to make it look fine scaled.

1 Like