Re: [AD] correct behaviour for additive blending? |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] correct behaviour for additive blending?
- From: Peter Wang <novalazy@xxxxxxxxxx>
- Date: Sat, 13 Mar 2010 16:19:05 +1100
On 2010-03-13, Elias Pschernig <elias.pschernig@xxxxxxxxxx> wrote:
> On Sat, 2010-03-13 at 09:22 +1100, Peter Wang wrote:
> > Am I doing something wrong or is this a bug?
> >
> > Here I draw two intersecting lines with additive blending.
> > On the offscreen bitmap the colour is as I expect (g=50; g=100 at the
> > intersection). On the backbuffer the colour is only half as much (g=25;
> > g=50 at the intersection).
>
> Here both look exactly the same (using OpenGL). I assume you use OpenGL
> as well, and I assume it has a version of at least 2.0.0. Which means
> there's probably a bug somewhere in our OpenGL code which is somewhat
> non-deterministic.
Yes, OpenGL (fglrx).
> What happens if you comment out the offscreen drawing? I.e. if you have
> just these 3 lines and never change the target bitmap:
Same.
> (Since you're
> saying the color is wrong on the backbuffer and not on the offscreen
> that also should reproduce it, right? But looking at that test case I
> assume you actually meant the other way around...)
>
> al_set_blender(ALLEGRO_ADD, ALLEGRO_ONE, ALLEGRO_ONE, al_map_rgba_f(1,1,1,1));
> al_draw_line(100, 150, 200, 150, al_map_rgb(0, 50, 0), 0);
> al_draw_line(150, 100, 150, 200, al_map_rgb(0, 50, 0), 0);
>
> But anyway if that's already wrong, does it still draw the lines with
> color 25? What if you use ALLEGRO_ALPHA, ALLEGRO_INVERSE_ALPHA instead?
Yes, same result.
I'll try it on a couple of other machines around here.
Peter