iDevGames Forums

Full Version: GL Blending Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
See the faint glow/fuzz around the one the right? What's going on? The one on the left is the original png layered on top of the screenshot in Photoshop.


[Image: upshot_qrkDnKZO.jpg]
Looks like somewhere between Photoshop and your image loader, you got pre-multiplied pixels. So all pixels with alpha are "too dark" with that blend equation.

This can happen if you use CoreGraphics to load images.
It looks like the pixels in your texture with low opacity have RGB of 255,255,255. This is done to improve compression but I thought this was only done only for pixels with 0 opacity (still a problem when using linear sampling), but in the image it looks like it is happening for all those with 'low' opacity.
Yes, you need to look into "pre-multiplied alpha". It is a perfect solution and not too dfficult to understand.
All you need to do is multiply all rgb values by the alpha when loading the image, and use this blend function instead:
It 'should' magically solve your problem.
Reference URL's