Jump to content

No smoothing on scaled-down sprites


Kokos
 Share

Recommended Posts

I'm having a problem with scaled down sprites, they don't seem to be smoothed properly.

 

In the screenshot below you can see the sprite on the left, its actual size is about 4 times as big. The original sprite is used on the model (this is a dress-up game), and the scaled-down sprite is used for the thumbnail. I re-use sprites as much as possible to prevent inflated file-sizes.

 

It's not a resolution issue, as you can see from the sprites to the right, they are smoothed very nicely.

 

The further I scale a sprite down, the worse it gets. The sprites are built on BitmapData, I've also tried running a resize on the sprite.key (BitmapData) instead of changing the sprite.scale, but that just removes the sprite all together (and to be honest I'd rather not do any more bitmapdata manipulations, as I have a lot of those in this game).

 

 

upload.png

 

Is there a reason why this is happening, and does somebody have a good idea on how to fix this? My PIXI scaleMode is set to the default Linear, and all Phaser settings for smoothing are on their default on states (I've tried explicitly turning everything on, which had no impact).

Link to comment
Share on other sites

It seems to be working! Not for everything, and I have some other scaling issues that come up because of it. But at least some of it is now anti aliased (after forcing their dimensions to be powers of two).

 

Doesn't work for canvas though :(

 

upload.png

 

 

EDIT: Also getting this to actually work with normal dimensions turns out to be really hard. Powers of two don't really align with the sizes I have to give the sprites.

Link to comment
Share on other sites

  • 2 years later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...