[Bf-committers] REVIEW: Premultiplied alpha viewing option in viewer.
troy.sobotka at gmail.com
Sat Oct 1 03:22:23 CEST 2011
Offering up a patch for review that fixes images with premultiplied
alpha being incorrectly rendered in the UV Image Editor window.
Discussed at length with Lukas Tonne.
It seems that a CompBuf doesn't retain any information regarding the
type of alpha being passed through it. As a result, it is impossible
to detect currently. Even then, it is likely prudent to leave this
decision up to the artist.
The patch includes a toggle that appears when an artist chooses to
display the image with alpha in the UV Image Editor. It has a separate
button with a custom designed icon. The patch turns on the proper
glBlendFunc mode to GL_ONE for associated alpha images and
GL_SRC_ALPHA for unassociated alpha.
It should also be noted that for some legacy ATI card implementation
reasoning, that by default the viewer only displays 8bpc sources. The
code is more or less intact but commented out for float support. It
may be worth considering either offering up a WITH_FLOAT_GL in the
compile options or a GL depth selection between 8bpc and 32bpc float.
More information about the Bf-committers