[Bf-codereview] Alpha premul pipeline cleanup (issue 7018048)

sergey.vfx at gmail.com sergey.vfx at gmail.com
Sat Dec 29 21:33:47 CET 2012


On 2012/12/28 13:31:00, brechtvl wrote:
> With the extra premultiplication in ibuf_get_color texture filtering
works
> mostly correct, however mipmapping (IMB_makemipmap) is still wrong.
There it
> should also premul/unpremul as it scales down the image, to get
correct
> interpolation.

> A compatibility issue here exists also when users have set up an image
as a
> texture but don't want to use its alpha channel (Use alpha disabled).
In this
> case premultiplying in texture filtering will make some areas black.
Maybe this
> is acceptable, or maybe the texture filtering should automatically
skip the
> premul in that case? For mipmaps it's a bit weak if the image is used
by
> multiple textures with different settings, but usually would go ok to
skip it.

Hrm. Passing Use Alpha flag here could be really tricky i'm afraid.
Also, didn't we want to add option to force alpha=1 on load, or it
should be just additional option?

https://codereview.appspot.com/7018048/


More information about the Bf-codereview mailing list