Re: Multisample Masks

New Message Reply Date view Thread view Subject view Author view

Orad Hi-Tec Systems (orad_u++at++netvision.net.il)
Wed, 26 Feb 1997 18:54:27 +0200


Mark Baranowski wrote:
>
> Hi,
>
> I wan't to fade certain geometry in and out of my scene. I am running
> on an Onyx iR Performer 2.1, Open GL compilation.
>
> It seems that it should be pretty straightforward to do using the
> multisample mask in a pre&post draw callback for the nodes I wish to
> fade (i.e. using glSampleMaskSGIS in a pre draw to effectively set the
> level of transparency I want, and then reset the mask in a post draw).
>
> Will this work? (Isn't it how Performer implements it's fade LOD
> feature) It seems much simpler than having to modify the alpha in
> materials/colours associated with the geometry etc. Is there anything
> I should be aware of wrt doing this?
>

Yes, it will work, I've done this too. You'll have to be carefull
about interfering with Performer's LOD-fades, if they exist inside
your affected sub-tree.

There is a catch, though.

Multisample transparency through fragment alpha
(glEnable(GL_SAMPLE_ALPHA_TO_MASK_SGIS))
has only n+1 levels of transparency (includeing totally transparent and
totally opaque), where n is the number of multi-samples in your visual.
glSampleMaskSGIS() produces a 2x2 transparency dithering pattern which
boosts the number of levels to 4*n+1 - so it is advantageous in this
respect too. You'll have to install patch1355 to fix a bug in the
dithering
patterns.

The quality of the fade greatly depends on this n.

There is a *very* annoying SGI hardware bug which prevents the setup
of n=8 multisamples coexisting with alpha bit-planes (no such visual
exists). You can only do n=4 multisamples with alpha bit-planes.
This is *independent* of your framebuffer memory size (number of RM6
boards).

Apparently, this bug was *not* fixed in the Onyx2 iR pipeline.

Bye,
Moshe Nissim
Orad Hi-Tec Systems
=======================================================================
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:54:44 PDT

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