I am trying to scale an SKSpriteNode object without smoothing/anti-aliasing (I\'m using pixel-art so it looks better pixelated).
Is there a property I need to set to do
Just a note, if you create a SKSpriteNode
instead of SKTexture
, you can set the SKTextureFilteringNearest
like in the following example:
SKSpriteNode *asteroid = [SKSpriteNode spriteNodeWithImageNamed:@"o1"];
asteroid.size = CGSizeMake(36, 24);
asteroid.position = CGPointMake(startX, startY);
asteroid.name = @"obstacle";
// >>>
asteroid.texture.filteringMode = SKTextureFilteringNearest;
// <<<
[self addChild:asteroid];