1

As I understand from init(data pixelData: NSData, size size: CGSize) method description:

An NSData object that holds the bitmap data. The pixels must be 32 bpp, 8bpc (unsigned integer) RGBA pixel data. The color components should have been already multiplied by the alpha value.

SKTexture always use RGB8888 format. Is it possible to switch to another format to reduce memory usage?

John Tracid
  • 3,836
  • 3
  • 22
  • 33

1 Answers1

0

There does not appear to be an way to load a texture with anything other than a 32BPP pixel format in SpriteKit (24BPP just ignores the alpha byte). But, it is possible to build texture compression on top of existing SpriteKit textures using a shader, see this answer for specifics on how to do that.

Community
  • 1
  • 1
MoDJ
  • 4,309
  • 2
  • 30
  • 65