Re: Changing Accumulation Buffer

New Message Reply Date view Thread view Subject view Author view

From: Lawrence Bertoldi (lberto++at++bert.clubfed.sgi.com)
Date: 01/26/2000 21:35:06


> Hi,
>
> I am rendering a scene with 2 different sets of material properties. I
> would like to display the scene as if the scene was rendered separately and
> additively superimposed. My thought was that the accumulation buffer would
> be ideal for this application. I could render each scene independently and
> use the accumulation buffer to mix the imagery. However, it seems that
> there is a serious performance penalty with the accumulation buffer.
>
> I used an onyx2 at 1280x1024 resolution as a test bed. It seems that it
> takes approximately 3.5 ms for each glAccum operation. In my experiments, I
> would
>
> 1) Render the scene with the first material property to the color buffer,
> 2) Copy the color buffer to the accumulation buffer,
> 3) Render the scene with the second material property to the color buffer,
> 4) Additively transfer the color buffer to the accumulation buffer, and
> 5) Copy the accumulation buffer back to the color buffer.

Why not render the scene once with the first material to the color buffer
Then:
change the material,
then do something like
glBlendFunc(GL_CONSTANT_ALPHA_EXT,GL_ONE_MINUS_CONSTANT_ALPHA_EXT);
       ( if no alpha (you might want to check the man page for specifics)),
glBlendEquationEXT(GL_FUNC_ADD_EXT);
glEnable(GL_BLEND);

render the object or scene again?

>
> There are three transfers between the color and accumulation buffers (Steps
> 2, 4, & 5). Those three steps have caused an additional 10.5 ms of fill
> time. 10.5 ms is a very heavy hit for my application.
>
> My next thought was to render the second scene directly in the accumulation
> buffer, and additively transfer the accumulation buffer back to the color
> buffer. But I do not know how to do either of those steps. (Or even if it
> is possible.)
>
> Can anyone offer any suggestions? I am open to any hints, hacks, or
> altogether different approaches. Thanks.
>
>
> PS Does anyone know how to load tiff files in performer? Thanks again.
> --
> Charles C. Paik
> The Boeing Company
> P.O. Box 516 MC S106-4715
> St. Louis, MO 630166-0516
>
> email: charles.c.paik++at++boeing.com
> phone: 314-233-6807 fax: 314-232-4181
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>

Lawrence Eugene Bertoldi
graphics consultant
SGI Professional Services
~;-}>


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Jan 26 2000 - 21:38:12 PST

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