I’m having trouble getting unmodified RGBA data from a png image through to my OpenGl texture using SDL_Image on iOS. Same stuff works fine on android. First problem was that XCode does premultiplication when packaging png images by default. I already disabled that.
Seems that at some stage when loading the png image, iOS does premultiplication anyway and SDL_Image does the inverse to get the original RGB values. The problem with this is that on parts where my alpha channel is zero or near to zero I’m losing all my color information. Or at least that’s what I think is happening by glancing the code @ IMG_ImageIO.m
I want to use the RGB data for color as it is, and alpha for other stuff in the shader. The texture is used in a fragment shader that my program uses a lot, so I’d like to avoid making the alpha channel a separate image (and adding another texture lookup). Could be that it doesn’t really affect perf that much, but I still think this should be fixed if possible.