Re: Final word on reading the Z-buffer in Performer 2.0

New Message Reply Date view Thread view Subject view Author view

Bernard Leclerc (bleclerc++at++cae.ca)
Tue, 1 Oct 1996 09:33:25 -0400


On Sep 27, 2:38pm, Janet Estabridis wrote:

> Some information:
>
> RE2, IRIX 5.3 --
>
> You can read the zbuffer successfully from Performer 2.0 in a draw
> callback routine using glReadPixels. You can have texturing enabled and
> multisampling visual enabled. I have now succeeded thanks to Jenny at
> SGI. Things work like they are supposed to, I just swapped GL_FLOAT and
> GL_DEPTH_COMPONENT in the glReadPixels and I never caught it until I
sent
> her my code.
>

Angus Dorbie replied:

> This seems misleading, are you saying you managed to read the zbuffer
> on RE2 while multisampling?
>
> Did you turn on pfAntialias or just have the visual without actually
> using multisampling?
>
> Did you mean Infinite Reality?
>

We're using the RE2, IrisGL, IRIX 5.3 and Performer 2.0

In order to read the depth component of a channel, we configured the frame
buffer with

    RGBsize(12);
    zbsize(32);
    stensize(1);
    mssize(4, 32, 1);
    gconfig();

This way, we have anti-aliasing available and the normal Z buffer is also
active so we can read it to obtain the depth component with

    readsource(SRC_ZBUFFER);
    lrectread(x1, y1, x2, y2, parray);

Of course, the Z components obtained correspond to the closest pixels
written to the multisample buffer. It's not an average value - but it's
better than nothing.

As far as I know, there is no way to obtain the resulting depth component
from the multi-sampled buffer. Only the normal Z buffer can be read.

--
Bernard Leclerc			CAE Electronics Ltd., 8585 Cote De Liesse
Technical Leader		Saint-Laurent, Quebec, Canada, H4L-4X4
3-D Graphics Applications	tel: +1 514 341 2000 extension 2275
bleclerc++at++cae.ca			fax: +1 514 340 5496
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:41 PDT

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