BradLarson / GPUImage

An open source iOS framework for GPU-based image and video processing
http://www.sunsetlakesoftware.com/2012/02/12/introducing-gpuimage-framework
BSD 3-Clause "New" or "Revised" License
20.24k stars 4.61k forks source link

Does GPUImage expect Unpremultiplied Alpha? #2535

Open scisci opened 6 years ago

scisci commented 6 years ago

I was trying to load png data into a texture with premultiplied alpha. I noticed transparent white renders more grey, meaning its not handling the premultiplied pixels correctly.

Does GPUImage expect that all image data is unpremultiplied?

I've read that with premultiplied inputs you need to have a special blend function and I haven't found that in the GPUImage source.

artemtkachenko commented 6 years ago

I have the same trouble, only completely transparent pixels are drawing actually transparent; Semi-transparent pixels draws with additional transparent grey background;

hezhk3 commented 5 years ago

Yes. See below: https://github.com/BradLarson/GPUImage/issues/1210#issuecomment-25182881 https://github.com/BradLarson/GPUImage/issues/926 https://github.com/BradLarson/GPUImage/issues/768