Re: [info-performer] pfShader wont cope with transparency

New Message Reply Date view Thread view Subject view Author view

From: Yair Kurzion (yair++at++polygon.engr.sgi.com)
Date: 03/14/2003 11:42:49


>
> On Friday 14 March 2003 02:29 am, Yair Kurzion wrote:
> > > On Thursday 13 March 2003 03:56 am, you wrote:
> > > > Hello Florian !
> > > >
> > > > You found a bug. Performer should always draw transparent geometry
> > > > after all opaque geometry.
> > > >
> > > > You can work around this bug in one of two ways:
> > > >
> > > > o Change the default bin sort order using pfChannel::setBinOrder
> > >
> > > well, actually it seemed to me as if the pfShader didnt care about bins
> > > at all.
> > > i tried to assign the bins of the GeoSets by hand, but it didnt change
> > > anything. still the pfShaded objects were drawn last.
> >
> > You can't control what bin shaded pfGeosets go to. However, you CAN control
> > the order of drawing bins.
>
> hmm, maybe i dont get the point, but resorting the drawing bins wont lead me
> anywhere, would it?
> i mean there is no built-in pfShader-bin or such, which i could draw before
> all others.
> i could only make the transparency bin drawn before the opaque win, which
> wouldnt make sense at all. and the shaded objs would still be drawn last.
> or did i get something wrong?

Performer puts all shaded geometry in the bin PFSORT_SHADER_BIN.
In order to change the draw order of bins, you can call (in a channel DRAW
callback):

    pfDrawBin(PFSORT_DEFAULT_BIN);
    pfDrawBin(PFSORT_OPAQUE_BIN);

    // Ignore the following if you don't use patchy fog.
    pfDrawBin(PFSORT_PATCHYFOG_BIN);

    pfDrawBin(PFSORT_SHADER_BIN);
    pfDrawBin(PFSORT_TRANSP_BIN);

    // Ignore the following if you don't use Calligraphic light points.
    pfDrawBin(PFSORT_LPSTATE_BIN);

Or, you can call pfChannel::setBinOrder with the above bins and change their
order. Just for fun, do pfChannel::getBinOrder and verify that the default
order puts PFSORT_SHADER_BIN after PFSORT_TRANSP_BIN (this is a bug).

-yair

-- 
\_________  \_____  \__    \__  \_____        
\_________  \_____   \__   \__  \_____         Yair Kurzion
       \__     \__   \____\__      \__         yair++at++sgi.com
       \__          \__  \__                  (650) 933-6502
       \__          \__   \__          
       \__          \__    \__             


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Mar 14 2003 - 11:43:02 PST

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