Re: Transparent textures on an IMPACT

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++sgi.com)
Fri, 03 Jul 1998 11:53:12 -0700


Roy Ruddle wrote:
>
> Hi there,
>
> I'm trying to convert some of my s/w from PF1.2 (running on a Crimson RE)
> to PF2.2 (running on a MaxIMPACT).
>
> Some of my textures need to be rendered transparently (e.g., trees) but
> the global override that I set of PF1.2 doesn't work.
>
> In my OpenPipeWin() func I have the lines:
> ...
> pfTransparency( PFTR_ON );
> pfAlphaFunc( 100.0f/255.0f, PFAF_GREATER );
> pfOverride( PFSTATE_TRANSPARENCY, PF_ON );
> ...
>
> but this render's my textures as if they had no transparency values (they
> are RGBA and are the exact same textures as work fine on the RE with
> PF1.2)
>
> Can anyone shed some light on this?

The token you use is wrong, it should be PFTR_ON or on IMPACT
you could be explicit and declare PFTR_BLEND_ALPHA. Perhaps the
tokens changed between releases, I haven't checked.

A global override for transparency is a bad thing anyway, it'll
slow you down unless it's in the right draw callback.

Also the pfAlphaFunc (and alpha ref) should also be overridden
since it is a separate state.

Your alpha ref is also very high which could cause unwanted
aliasing. It's better to lower this value enable sorting in
the draw callback and depth sort the transparency bin.

Cheers,Angus.

-- 
"Only the mediocre are always at their best." -- Jean Giraudoux 

For advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/ ======================================================================= 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:57:40 PDT

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