Additive (not linear) compositing when using GLX

Rendaw rendaw at zarbosoft.com
Sat Oct 23 10:22:15 PDT 2010


  On 10/18/2010 06:48 PM, Carsten Haitzler (The Rasterman) wrote:
> On Mon, 18 Oct 2010 12:57:25 -0500 Rendaw<rendaw at zarbosoft.com>  said:
>> I guess I sort of expected glx to handle that, since, should it not, I'd
>> have to change all my calls to glBlendFunc/glColor, glClearColor, and
> yup. you need to change them. as such it won't hurt - you should use premul
> argb anyway. there is no other sane way to do destination alpha rendering and
> keep rendering correct - so if you ever render to an fbo for example - you'll
> need this mode if you ever want that fbo to have an alpha channel of its own
> etc.
>
I didn't think it through, but I still think there are some corner cases 
(like additive blending in-application) that might cause problems 
without rendering to an intermediate surface, but uhh... I can't think 
of how that would be defined anyways.
>> all my shader code, right?  Or is there an easier way to get
>> premultiplication?  Well, I guess transparent applications aren't
>> exactly common, anyways.
> well that depends what you are doing in your shaders :) and also what your
> textures are. as such i moved my entire rendering pipeline to premul ages ago -
> textures are premul argb, as are fbo's, buffers and everything. once youa re
> there life is easy.
>
I think you're right, I'll follow your example.

Thanks again!


More information about the xorg-devel mailing list