Share via


D3DLIGHT8

This structure defines a set of lighting properties.

typedef struct _D3DLIGHT8 {
  D3DLIGHTTYPE Type;
  D3DCOLORVALUE Diffuse;
  D3DCOLORVALUE Specular;
  D3DCOLORVALUE Ambient;
  D3DVECTOR Position;
  D3DVECTOR Direction;
  float Range;
  float Falloff;
  float Attenuation0;
  float Attenuation1;
  float Attenuation2;
  float Theta;
  float Phi;
} D3DLIGHT8;

Members

  • Type
    Type of the light source. This value is one of the members of the D3DLIGHTTYPE enumerated type.
  • Diffuse
    Diffuse color emitted by the light. This member is a D3DCOLORVALUE structure.
  • Specular
    Specular color emitted by the light. This member is a D3DCOLORVALUE structure.
  • Ambient
    Ambient color emitted by the light. This member is a D3DCOLORVALUE structure.
  • Position
    Position of the light in world space, specified by a D3DVECTOR structure. This member has no meaning for directional lights and is ignored in that case.
  • Direction
    Direction that the light is pointing in world space, specified by a D3DVECTOR structure. This member only has meaning for directional lights. This vector need not be normalized, but it should have a nonzero length.
  • Range
    Distance beyond which the light has no effect. The maximum allowable value for this member is the square root of FLT_MAX. This member does not affect directional lights.
  • Falloff
    Not supported.
  • Attenuation0, Attenuation1, and Attenuation2
    Values specifying how the light intensity changes over distance. Attenuation values are ignored for directional lights. These members represent attenuation constants. For information on attenuation, see Light Attenuation Over Distance. Valid values for these members range from 0.0 to infinity. For non-directional lights, all three attenuation values should not be set to 0.0 at the same time.
  • Theta
    Not supported.
  • Phi
    Not supported.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: D3d8types.h.

See Also

IDirect3DDevice8::GetLight | IDirect3DDevice8::SetLight | Direct3D Structures

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.