DirectX SDK

Colored Lights

[C++]

The color-related members of the D3DLIGHT7 structure (dcvDiffuse, dcvSpecular, dcvAmbient) are D3DCOLORVALUE structures. The colors defined by these structures are RGBA values that generally range from zero to one, with zero being black. Although you will usually want the light color to fall within this range, you can use values outside the range for special effects. For example, you could create a strong light that washes out a scene by setting the color to large values. You could also set the color to negative values to create a dark light, which actually removes light from a scene. Dark lights are useful for forcing dramatic shadows in scenes and other special effects.

[Visual Basic]

The color-related members of the D3DLIGHT7 type (diffuse, specular, ambient) are D3DCOLORVALUE types. The colors defined by these are RGBA values that generally range from zero to one, with zero being black. Although you will usually want the light color to fall within this range, you can use values outside the range for special effects. For example, you could create a strong light that washes out a scene by setting the color to large values. You could also set the color to negative values to create a dark light, which actually removes light from a scene. Dark lights are useful for forcing dramatic shadows in scenes and other special effects.