Shade Model Settings
53
Shade Model Settings
You set the shading model using the setShadeModel() method with one of the following
csContext::ShadeModelEnum values as its argument:
FLAT_SHADE Each primitive, geometric polygon that comprises a geometry has the
same shade value. This option has the effect of making the primitive
geometric polygons visible.
SMOOTH_SHADE
Shade values are interpolated across primitive geometric polygons. This
option makes the primitive polygons look more like a curved surface.
Transparency Settings
To specify the transparency of a geometry locally, enable the transparency mode by
setting setTranspEnable() to ON and then specifying the transparency mode in the
argument of setTranspMode(). The possible transparency values include
FAST_TRANSP Produces as quickly-rendered, lower-quality transparent geometry.
NICE_TRANSP Produces a more slowly-rendered, higher-quality transparent geometry.
BLEND_TRANSP
Produces a smooth transparency between foreground and background
images.
SCREEN_DOOR_TRANSP
Produces a mottled transparency, as though every other pixel is
transparent.
Commonly, you use the setTranspMode() twice: you specify
• FAST_TRANSP or NICE_TRANSP
• BLEND_TRANSP or SCREEN_DOOR_TRANSP
Producing Transparency Without Blending
The setAlphaFunc() method sets the requirements for whether or not a pixel is rendered.
Not rendering some of the pixels in a geometry has the effect of making the geometry
partially transparent.