Pixel art sharpness

Is there any way to apply a sort of nearest neighbor filtering to the graphics layer such that when scaled to 2x the pixel art retains its sharpness?

Or is there no other way but to scale them in Photoshop with said nearest neighbor scaling and then save as 2x.

I ask this as the former would be a big convenience! [import]uid: 63884 topic_id: 15834 reply_id: 315834[/import]

Hey,

If you want to get your pixel art to retain its sharpness then really I would suggest you use @2x (see Ghosts VS Monsters for sample usage) and save two sets of PNGs for your app.

I say this because enlarging a PNG of Pixel art can look rough, but if you open the originals in Photoshop and save a copy as a GIF, you should then be able to double the size and have it look crisp and perfect - then save the result as image@2x.

Peach :slight_smile: [import]uid: 52491 topic_id: 15834 reply_id: 58561[/import]

Thanks for the reply!

That’s what I’ve been doing at the moment, but I was just wondering if it was possible (I understand you can change the OpenGL magnification filter in Cocos2D to achieve this purpose without making any 2x graphics). No worries then, just have to put in a little more effort as you have stated.

If I could ask also, what purpose the antialias flag in config.lua serves? By default it is false, but I see no visible change when it is set to true either. [import]uid: 63884 topic_id: 15834 reply_id: 58575[/import]

Corona uses software anti-aliasing for its vector objects. Previously, this anti-aliasing was on by default. It is now off by default, which will greatly improve performance of vector objects, and should make very little visual difference on the latest high-dpi devices.
http://developer.anscamobile.com/content/configuring-projects

Does that help?

Peach :slight_smile: [import]uid: 52491 topic_id: 15834 reply_id: 58691[/import]

It does, thanks. Last question if you will, any idea when image tints and bitmap masks will work together? I understand it’s a limitation at the moment but I do foresee some key features of my game hinging on that. [import]uid: 63884 topic_id: 15834 reply_id: 58700[/import]

That isn’t something I can answer as it’s not my area, however I will have an ask around and see if there’s any info I’m able to share with you :slight_smile:

Peach [import]uid: 52491 topic_id: 15834 reply_id: 58705[/import]

Gotcha. Thanks a bunch! [import]uid: 63884 topic_id: 15834 reply_id: 58710[/import]