iPhone OpenGLES textures - colour banding

Posted by chicknstu on Stack Overflow See other posts from Stack Overflow or by chicknstu
Published on 2010-05-17T18:38:02Z Indexed on 2010/05/17 18:40 UTC
Read the original article Hit count: 314

Filed under:
|
|
|

I've got a problem with openGL on iPhone which I'm sure must have a simple solution!

When I load a texture and display it, I get a lot of what I believe is called 'Colour Banding', whereby the colours, particularly on gradients, seem to get automatically 'optimized'.

Just to demonstrate that this wasn't anything wrong with my own code, I downloaded the iPhone 'Crashlanding' app and replaced the background image, and as you can see in the image below (Taken from the simulator), the exact same thing happens. The image on the left is the original PNG, and on the right is it in the game. It's almost as if it's palette is being downsized to a 256 colour one.

Screenshot

I'm sure this is related to the format I'm saving the image as, although it doesn't just happen with PNG's, it seems to happen no matter what image format I chose.

Doing my head in! If you want to recreate this, simply download the crash landing app, and replace the background. Thanks so much in advance for any help.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about opengl-es