Nearest neighbour scaling for pixelart

I would like to see an extra config.lua option, which uses nearest neighbour scaling instead of antialiased / bilinear.

This would be app-wide.

I know we have the option to double the pixelart when exporting, but that’s not really something I would like to do.

In cocos2d this was fixed:
http://www.cocos2d-iphone.org/forum/topic/20739
[[CCDirector sharedDirector] openGLView].layer.magnificationFilter = kCAFilterNearest;
[[CCDirector sharedDirector] openGLView].layer.contentsRect = CGRectMake(0.0001, 0.0001, 1, 1);
[import]uid: 5942 topic_id: 23004 reply_id: 323004[/import]

This has been requested several times. And I agree. Its just setting a flag. Double the textures is utterly stupid both in GPU performance as in memory consumption.

Either like you suggested on a config scale

but also on object level. So some object can be “antialiased” and some crisp pixels.
I also believe that OpenGL support to set if it should use this for both down (below 1:1) and up scaling. (If having it filter when it scales down the object to reduce flickering, but keep it sharp when upscaling/zooming into objects.

object.filtering = nearest/ bilinear / trilinear

(how is mip-mapping in Corona, do not Xcode, create mipmaps automatic of all objects with the power of 2?) [import]uid: 37802 topic_id: 23004 reply_id: 101240[/import]