shadem man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



shadem(3G)							    shadem(3G)

NAME
     shadem - selects the shading model

FORTRAN 77 SPECIFICATION
     subroutine shadem(model)
     integer*4 model

PARAMETERS
     model   expects one of two possible flags:

	     FLAT, tells the system to assign the same color to each pixel of
	     lines and polygons during scan conversion.

	     GOURAU, tells the system to interpolate color from vertex to
	     vertex when scan converting lines, and to interpolate color
	     throughout the area of filled polygons when they are scan
	     converted.	 This is the default shading model.

DESCRIPTION
     shadem determines the shading model that the system uses to render lines
     and filled polygons.  When the system uses Gouraud shading, the colors
     along a line segment are an interpolation of the colors at its vertices,
     and the colors in the interior of a filled polygon are an interpolation
     of the colors at its vertices.  In RGB mode, red, green, blue, and alpha
     (when supported) are all interpolated.  Currently the interpolation is
     linear.  Future architectures may do nonlinear interpolation to
     compensate for errors due to extreme projection.

     When flat shading is specified, color is not interpolated.	 Rather, the
     color of the second vertex of a line segment, or of the last vertex of a
     polygon, is used at each pixel of the line segment or polygon.  Thus
     connected lines, triangles, and quadrilaterals can be successfully flat
     shaded.  For example, the color of the nth segment in a connected line is
     determined by the color of vertex n+1, and the color of the nth triangle
     in a mesh is determined by the color of vertex n+2.

     Color interpolation or flat shading occurs after lighting and depthcueing
     calculations are made, so both these color generation operations can be
     either flat or Gouraud shaded.  Texture, fog, and blending calculations,
     however, occur after pixel shading is completed.  These operations are
     always themselves Gouraud shaded, regardless of the current shade model.
     This means, for example, that a triangle mesh can be lighted or depthcued
     with flat shaded facets, then fogged or texture mapped smoothly.

SEE ALSO
     getsm

NOTE
     Gouraud is the default shading model, but is in general slower than flat
     shading. To improve performance, specify flat shading where Gouraud
     shading is not required.

									Page 1

shadem(3G)							    shadem(3G)

BUGS
     On IRIS-4D B and G models, and on the Personal Iris without Turbo
     Graphics, lines are always drawn with constant color regardless of the
     current shading model.  Also, flat shaded independent polygons scan
     convert to a single color, but this color is not always that of the last
     vertex specified, Flat shaded polygons yield consistent results on these
     models only when the same color is specified at each vertex.  On Infinite
     Reality and Impact flat shaded independent polygons are shaded the color
     of the first vertex.

     On IRIS-4D GT and GTX models, lines drawn with move and draw are always
     flat shaded, and lines drawn with v commands are always Gouraud shaded,
     regardless of the current shading model.  Independent polygons are always
     Gouraud shaded.  Triangle meshes are correctly flat or Gouraud shaded,
     depending on the shading model.

     On early versions of IRIS-4D GT and GTX models, alpha is not interpolated
     correctly within polygons.

     On IRIS-4D VGX models, independent quads will flat-shade with the color
     from the third vertex instead of the fourth.

									Page 2

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net