D3DMATERIAL9 structure

Specifies material properties.

Syntax


typedef struct D3DMATERIAL9 {
  D3DCOLORVALUE Diffuse;
  D3DCOLORVALUE Ambient;
  D3DCOLORVALUE Specular;
  D3DCOLORVALUE Emissive;
  float         Power;
} D3DMATERIAL9, *LPD3DMATERIAL9;

Members

Diffuse

Type: D3DCOLORVALUE

Value specifying the diffuse color of the material. See D3DCOLORVALUE.

Ambient

Type: D3DCOLORVALUE

Value specifying the ambient color of the material. See D3DCOLORVALUE.

Specular

Type: D3DCOLORVALUE

Value specifying the specular color of the material. See D3DCOLORVALUE.

Emissive

Type: D3DCOLORVALUE

Value specifying the emissive color of the material. See D3DCOLORVALUE.

Power

Type: float

Floating-point value specifying the sharpness of specular highlights. The higher the value, the sharper the highlight.

Remarks

To turn off specular highlights, set D3DRS_SPECULARENABLE to FALSE, using D3DRENDERSTATETYPE. This is the fastest option because no specular highlights will be calculated.

For more information about using the lighting engine to calculate specular lighting, see Specular Lighting (Direct3D 9).

Requirements

Header

D3D9Types.h

See also

IDirect3DDevice9::GetMaterial
IDirect3DDevice9::SetMaterial

 

 

Community Additions

ADD
Show:
© 2014 Microsoft