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

brechtvanlommel at gmail.com brechtvanlommel at gmail.com
Sun Dec 30 11:20:44 CET 2012


On 2012/12/29 20:33:47, sergey.vfx wrote:
> 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?

I think force alpha 1.0 on load is ok, which could replace the "Use
Alpha" option on the texture. You can't get perfect compatibility then
but in most cases it would be fine if the image is only used for the
texture.

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


More information about the Bf-codereview mailing list