Re: Stencilling and Shadow Volumes within Performer

New Message Reply Date view Thread view Subject view Author view

John Rohlf (jrohlf++at++tubes)
Tue, 21 Feb 95 10:36:08 PST


>
> Hi Kathy,
> perhaps you haven't sorted the stencil operation with the rest of the
> scene geometry. You must perform the stenciling last and adding it to the scene
> graph last may not guarantee the drawing order. Your geosets also need to be
> drawn correctly relative to each other so it might be worth performing the
> entire shadowing operation as a callback to a transparent geoset which will be
> sorted last(ish) in the scene (if you have sorting on), with three explicit
> calls to pfDrawGSet(). You could even perform the shadowing after you call
> pfDraw() to ensure the whole thing is done last but this means you'll have to
> position the shadow using the GL.
> Also when you perform your stenciling it might be worth overriding some state
> information such as DECAL.
>

        This last statement is important. When using GL features for
fancy stuff like shadows you need to override Performer mode
settings which also use that particular GL feature. Unfortunately,
there is no documentation on the exact GL modes that Performer uses
but here is a quick listing:

pfDecal
 - stencil if PFDECAL_HIGH_QUALITY
 - displacepolygon if PFDECAL_FAST

pfTransparency
 - blendfunction if multisampling not enabled or PFTR_HIGH_QUALITY
 - msalpha if multisampling enabled or PFTR_FAST

pfAntialias
 - pntsmooth/linesmooth if multisampling not available
 - mssize() if multisampling available
 - special round, fast points if multisampling available

2.0 has a new call, pfGLOverride which forces the use of a particular
GL method for a performer mode,
e.g., pfGLOverride(PFGL_DECAL, PFGL_DECAL_DISPLACE) that will be
useful for these kind of things.


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:50:59 PDT

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