Re: Gouraud Shading w/ pfMaterial

New Message Reply Date view Thread view Subject view Author view

Marcus Barnes (marcus++at++multigen.com)
Fri, 21 Mar 1997 12:24:26 -0800


On Mar 20, 4:42pm, SCOTT OFRIEL wrote:
>
> Is it possible to use Gouraud shading on a pfGeoSet, say a quad, when using a
> pfMaterial that is associated with it's pfGeostate?

Yes. The material generally gets pfMtlColorMode(
PFMTL_CMODE_AMBIENT_AND_DIFFUSE ). The geostate has lighting enabled and the
geoset has a primitive type that is not FLAT (to insire shademodel( GOURAUD )).
The geoset also has normals and per vertex colors.

> Right now I am doing Gouraud shading and assigning a color to each vertex,
but
> I would like to use transparency which requires a pfMaterial.

Transparency does not require a material. The geoset colors are RGBA colors and
the alpha component is usable; see pfMaterial(3) note:

""
For non-homogeneous transparency, use a color mode other than PFMTL_CMODE_OFF
and transparency will be taken from geometry colors.
""

The geostate must have PFSTATE_TRANSPARENCY enabled in any case.

Regards.

--
+ Marcus Barnes, Technical Staff        mailto:marcus++at++multigen.com +
+ Multigen Inc.                         http://www.multigen.com    +
+ 550 S. Winchester Blvd.               phoneto:1-408-556-2654     +
+ Suite 500 San Jose CA 95128           faxto:1-408-261-4102       +
=======================================================================
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:56 PDT

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