Skip to content

Latest commit

 

History

History
110 lines (76 loc) · 4.5 KB

ns-d3dumddi-_d3dddi_light.md

File metadata and controls

110 lines (76 loc) · 4.5 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NS:d3dumddi._D3DDDI_LIGHT
_D3DDDI_LIGHT (d3dumddi.h)
The D3DDDI_LIGHT structure describes a set of lighting properties.
display\d3dddi_light.htm
display
05/10/2018
D3DDDI_LIGHT structure
D3DDDI_LIGHT, D3DDDI_LIGHT structure [Display Devices], D3D_other_Structs_4f43b697-886b-47bf-97b9-603306e899f8.xml, _D3DDDI_LIGHT, d3dumddi/D3DDDI_LIGHT, display.d3dddi_light
d3dumddi.h
D3dumddi.h
Windows
Available in Windows Vista and later versions of the Windows operating systems.
Windows
D3DDDI_LIGHT
_D3DDDI_LIGHT
d3dumddi/_D3DDDI_LIGHT
D3DDDI_LIGHT
d3dumddi/D3DDDI_LIGHT
APIRef
kbSyntax
HeaderDef
d3dumddi.h
_D3DDDI_LIGHT
D3DDDI_LIGHT

_D3DDDI_LIGHT structure

-description

The D3DDDI_LIGHT structure describes a set of lighting properties.

-struct-fields

-field Type [in]

A D3DLIGHTTYPE-typed value that indicates the type of the light source. For more information about D3DLIGHTTYPE, see the Microsoft Windows SDK documentation.

-field Diffuse [in]

A D3DCOLORVALUE structure that indicates the diffuse color that is emitted by the light. For more information about D3DCOLORVALUE, see the Windows SDK documentation.

-field Specular [in]

A D3DCOLORVALUE structure that indicates the specular color that is emitted by the light.

-field Ambient [in]

A D3DCOLORVALUE structure that indicates the ambient color that is emitted by the light.

-field Position [in]

A D3DVECTOR structure that indicates the position of the light in world space. This member has no meaning for directional lights (that is, if D3DLIGHT_DIRECTIONAL is set in the Type member) and is ignored in that situation. For more information about D3DVECTOR, see the Windows SDK documentation.

-field Direction [in]

A D3DVECTOR structure that indicates the direction that the light is pointing in world space. This member has meaning only for directional lights and spotlights (that is, if D3DLIGHT_DIRECTIONAL and D3DLIGHT_SPOT are set in Type). This vector is not required to be normalized, but it should have a nonzero length.

-field Range [in]

The distance beyond which the light has no effect. The maximum allowable value for this member is D3DLIGHT_RANGE_MAX, which is defined as the square root of FLT_MAX. This member does not affect directional lights.

-field Falloff [in]

The decrease in illumination between a spotlight's inner cone (the angle that is specified by the Theta member) and the outer edge of the outer cone (the angle that is specified by the Phi member). The effect of falloff on the lighting is subtle. Furthermore, a small performance penalty is incurred by shaping the falloff curve. For these reasons, most developers set this member to 1.0.

-field Attenuation0 [in]

The light's constant attenuation factor. Attenuation values specify how the light intensity changes over distance. Attenuation does not affect directional lights. Valid values for this member range from 0.0 through infinity.

-field Attenuation1 [in]

The light's linear attenuation factor. Attenuation values specify how the light intensity changes over distance. Attenuation does not affect directional lights. Valid values for this member range from 0.0 through infinity.

-field Attenuation2 [in]

The light's quadratic attenuation factor. Attenuation values specify how the light intensity changes over distance. Attenuation does not affect directional lights. Valid values for this member range from 0.0 through infinity.

-field Theta [in]

The angle, in radians, of a spotlight's inner cone--that is, the fully illuminated spotlight cone. This value must be in the range from 0 through the value that is specified by the Phi member.

-field Phi [in]

The angle, in radians, that defines the outer edge of the spotlight's outer cone. Points outside this cone are not lit by the spotlight. This value must be between 0 and Pi.

-see-also

SetLight