From: Paik, Charles C (Charles.Paik++at++MW.Boeing.com)
Date: 02/01/2000 10:41:59
Wouldn't this approach have problems with alpha blended textures on the
scene? For example, wouldn't this approach mess up things like tress that
are quads with an alpha blended texture.
I'm wondering if an accumulation buffer approach would be more appropriate?
Thanks for the suggestions thus far. Any further thoughts?
-- Charles C. Paik The Boeing Company P.O. Box 516 MC S106-4715 St. Louis, MO 630166-0516email: charles.c.paik++at++boeing.com phone: 314-233-6807 fax: 314-232-4181
> ---------- > From: Phil Keslin[SMTP:philk++at++cthulhu.engr.sgi.com] > Sent: Thursday, January 27, 2000 1:41 PM > To: Brian Furtaw > Cc: Paik, Charles C; 'Lawrence Bertoldi'; 'info-performer++at++sgi.com' > Subject: Re: Changing Accumulation Buffer > > Brian Furtaw wrote: > > > > I think I have the answer to this. Here is what I am going to try. I am > > going to duplicate all the pfGeodes in the scenegraph so I can do this > > in one pass through the scenegraph. I'll add pre and post Draw callbacks > > to do the following. Set the glBlendColorEXT(0,0,0,0.5) so half the > > intensity of each material pass is combined, this way I can at most get > > full intensity. Turn on blending glEnable(GL_BLEND), I can't use > > pfTranparency here because it turns off the depth buffer. For the first > > material the glBlendFunc(GL_CONSTANT_ALPHA_EXT, GL_ZERO) ignore the > > background. For the second material glBlendFunc(GL_CONSTANT_ALPHA_EXT, > > GL_ONE) adding it to the previous rendering of the object. I am going > > to try and leave the depth buffer on because I only want the pixels that > > would normally win the depth test. Because the depth buffer is on I will > > have to displace (pfLayer Node) the second material pass forward so the > > depth test doesn't cancel out my pixels and ruin the blending. > > I wouldn't do the blend on the first pass. Not quite sure if there is an > optimization in the IMPs, but you could be forcing a read-modify-write > cycle on > the IMP as well as enabling the multiply in the pipeline. Setting the > blend > function to CONSTANT_ALPHA and 1-CONSTANT_ALPHA should have the same > effect when > enabled on the second pass. > > Also, why would you want to displace the object? If you do this, you could > end > up with artifacts. Just ensure the depth function is <= and you should be > okay > (unless I'm missing something). > > - Phil > -- > Phil Keslin <philk++at++engr.sgi.com> >
This archive was generated by hypermail 2b29 : Tue Feb 01 2000 - 11:06:11 PST