Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 1.69 KB

distantlight.md

File metadata and controls

50 lines (35 loc) · 1.69 KB
-api-id -api-type
T:Windows.UI.Composition.DistantLight
winrt class

Windows.UI.Composition.DistantLight

-description

An infinitely large distant light source that emits light in a single direction. For example, a distant light could be used to represent sunlight.

-remarks

DistantLights and SpotLights support direction.

DistantLight is one of the four light types derived from CompositionLight.

Light Description
AmbientLight A light source that emits non directional light that appears to have been reflected by everything in the scene.
DistantLight An infinitely large distant light source that emits light in a single direction.
PointLight A point source of light that emits light in all directions.
SpotLight A light source that emits inner and outer cones of light.

Note

A Visual cannot be targeted by more than two non-ambient lights (PointLight, SpotLight or DistantLight).

Version history

Windows version SDK version Value added
1709 16299 Intensity

-examples

_distantLight = _compositor.CreateDistantLight(); 
_distantLight.Color = Colors.Yellow; 
_distantLight.Direction = new Vector3(0,-1, 0); 
_distantLight.CoordinateSpace = root; 
_distantLight.Targets.Add(root);          

-see-also

CompositionLight, CompositionLight.Targets, Compositor.CreateDistantLight