Re: transparency

New Message Reply Date view Thread view Subject view Author view

John Rohlf (jrohlf++at++tubes)
Tue, 24 Jan 95 12:04:19 PST


>
> I get a different result from using this:
>
> pfGStateMode( exp_gstate, PFSTATE_TRANSPARENCY,
> PFTR_ON|PFTR_NO_OCCLUDE );
>
> as opposed to:
>
> long exp_trans_state;
> long PreDraw(pfTraverser *trav, void *data)
> {
> exp_trans_state = pfGetTransparency();
> pfTransparency(PFTR_ON|PFTR_NO_OCCLUDE);
> return PFTRAV_CONT;
> }
>
> long PostDraw(pfTraverser *trav, void *data)
> {
> pfTransparency(exp_trans_state);
> return PFTRAV_CONT;
> }
>
> The pre-draw and post-draw function callback technique provides
> the correct transparent geoset (of course the alpha values are
> set correctly). However, setting the state mode works for
> allowing transparency, but it makes the geoset occlude other
> transparent geometry. I have attempted just about every combination
> of state mode to get it to work the same, but no luck. Obviously,
> I could just stick to the function callbacks, but I want to know
> why setting the state doesn't work.
>
> I have images which show the results of both methods for those
> interested to see them.
>
> ______________________________________________________________________________
> /\ ______ /\____ ______ ______ E-mail: marrou++at++vsl.ist.ucf.edu
> Visual / / / _ / / __ // ____// ____/ VSL: (407)658-5073
> Systems / /__ / /_/ / / / / // /___ / __/_ R. Marrou Fax: (407)658-5059
> Lab /____//____/\\/_/ /_//_____//_____/ http://www.vsl.ist.ucf.edu/~marrou
> "Reap the whirlwind." "We don't need no thought control."
>
>

        In 1.2, displacepolygon-type decaling uses zwritemask which
can have unfortunate collisions with transparency's use of
zwritemask. If you are using displacepolygon-type decaling then
you are encountering this bug and the workaround is to use
stencil-type decaling. If you are not using displacepolygon-type decaling
then I would be interested in a test case if you can easily whip
one up.


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:53 PDT

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