Closed mnovbaalen closed 3 years ago
That even w/h option might collide with trimAlpha
and extrude
which will auto determine sprite size.
Can you make a short sample (in http://jsfiddle.net/ or similar sites) to reproduce this blurry sprite? I was wondering if it's a mipmap generation problem with the atlas being odd w/h? Or just sprite rendered not pixel snaped or roundPixel settings not enabled?
I've also reported to the Pixi.js developers.
Sorry for the late reply.
Thank you for your suggestions. I'm going to investigate my problem because I think you are right.
I think it has to do with my pixi application/renderer settings. I made a fiddle and can not reproduce the problem!
I'll share my findings when I solved this.
I can confirm that my problem was related to non-rounded pixel positions. Setting PIXI.Sprite.roundPixels = true solved my problem.
Thank you for your help!
I use Atlasify for a project where I load the generated spritesheet in Pixi.js. When source images have an uneven value for width or height, Pixi.js renders them blurry.
It would be great if there was command line option to prevent uneven width or height, so people can prevent this behavior. This can be achieved to increase the width or height in that case.
The following code change allows to generate even width / height but does this always, and not when a commanline option is set.