SKSpriteNode and SKLightNode not respecting SKTextureFilteringMode.nearest

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



SKSpriteNode and SKLightNode not respecting SKTextureFilteringMode.nearest



When I have a SKLightNode in my scene with a SKSpriteNode with the filtering mode set to SKTextureFilteringMode.nearest the sprite is blurry when scaling.


SKLightNode


SKSpriteNode


SKTextureFilteringMode.nearest


let light = SKLightNode()
light.categoryBitMask = 1
light.falloff = 0.1
light.isEnabled = true
self.addChild(light)

let aSprite = SKSpriteNode(texture: aTexture)
aSprite.texture?.filteringMode = SKTextureFilteringMode.nearest
aSprite.normalTexture = head.texture?.generatingNormalMap()
aSprite.normalTexture?.filteringMode = SKTextureFilteringMode.nearest
aSprite.lightingBitMask = 0b0001
aSprite.setScale(10.0)
self.addChild(aSprite)



Here is an example with light source (red dote) and two sprites with the only difference being the lightingBitMask


lightingBitMask



enter image description here



Is this a bug or is it possible to keep the nearest neighbor filtering mode when scaling yet still use a light source? Or does the normal map get messed up when you scale the sprite?









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Creating a leaderboard in HTML/JS