?/TD>
Microsoft DirectX 9.0

D3DSHADEMODE Enumerated Type


Defines constants that describe the supported shading modes.

Syntax

typedef enum _D3DSHADEMODE {
    D3DSHADE_FLAT = 1,
    D3DSHADE_GOURAUD = 2,
    D3DSHADE_PHONG = 3,
    D3DSHADE_FORCE_DWORD = 0x7fffffff
} D3DSHADEMODE;

Constants

D3DSHADE_FLAT

Flat shading mode. The color and specular component of the first vertex in the triangle are used to determine the color and specular component of the face. These colors remain constant across the triangle; that is, they are not interpolated. The specular alpha is interpolated. See Remarks.

D3DSHADE_GOURAUD

Gouraud shading mode. The color and specular components of the face are determined by a linear interpolation between all three of the triangle's vertices.

D3DSHADE_PHONG

Not supported.

D3DSHADE_FORCE_DWORD

Forces this enumeration to compile to 32 bits in size. This value is not used.

Remarks

The first vertex of a triangle for flat shading mode is defined in the following manner.

The members of this enumerated type define the vales for the D3DRS_SHADEMODE render state.

Enumerated Type Information

Headerd3d9types.h
Minimum operating systems Windows 98

See Also

D3DRENDERSTATETYPE


© 2002 Microsoft Corporation. All rights reserved.