?/TD> |
Microsoft DirectX 9.0 |
Specifies material properties.
Syntax
typedef struct _D3DMATERIAL9 { D3DCOLORVALUE Diffuse; D3DCOLORVALUE Ambient; D3DCOLORVALUE Specular; D3DCOLORVALUE Emissive; float Power; } D3DMATERIAL9;
Members
- Diffuse
- Value specifying the diffuse color of the material. See D3DCOLORVALUE.
- Ambient
- Value specifying the ambient color of the material. See D3DCOLORVALUE.
- Specular
- Value specifying the specular color of the material. See D3DCOLORVALUE.
- Emissive
- Value specifying the emissive color of the material. See D3DCOLORVALUE.
- Power
- 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.
Structure Information
Header d3d9types.h Minimum operating systems Windows 98
See Also
IDirect3DDevice9::GetMaterial, IDirect3DDevice9::SetMaterial