View Full Version : Do I must divide alpha out if DST is non-premultiplied?
04-02-2007, 11:19 PM
In some of the blending equations, alpha is divided out if the source is premultiplied and the destination is non-premultiplied. Do I must do the division? Are there any applications which will use premutiplied source and non-premultiplied destination? I'm just thinking it is very expensive to do a division per pixel. Anyone could help me? Thanks a lot!
04-03-2007, 05:29 AM
I just disallow non-premultiplied egl-surfaces for rendering with OpenVG :-)
That way I can do all my rendering in premultiplied colorspace and never run into the problem to do a post-divide step for rendering. Makes things *MUCH* easier to deal with.
For format conversion between VGImage objects you need to do a postdivide here and there. But those operations usualy don't happen that often.
Btw, if you think the divide per pixel is slow - wait until you've seen the equation for radial gradients.. A per pixel square root is lurking there.
Hope that helps,
04-05-2007, 07:34 AM
Well, sounds good to me! :)
Hope not many people using the radial gradients, although I like those images...
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.