Re: Changing Accumulation Buffer

New Message Reply Date view Thread view Subject view Author view

From: Phil Keslin (philk++at++cthulhu.engr.sgi.com)
Date: 01/27/2000 11:41:01


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>


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Jan 27 2000 - 11:41:09 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.