D3DSHADEMODE

Defines constants that describe the supported shading modes.

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

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. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. 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.

See Also

D3DRENDERSTATETYPE