SceneLightingEffect SceneLightingEffect SceneLightingEffect SceneLightingEffect Class

Definition

Controls the reflective properties of a SpriteVisual. A SceneLightingEffect will overwrite CompositionLight defaults. It is used to control the reflective properties of a SpriteVisual. A NormalMap can be used as an input source but is not required.

public : sealed class SceneLightingEffect : IGraphicsEffect, IGraphicsEffectSource, ISceneLightingEffect, ISceneLightingEffect2
struct winrt::Windows::UI::Composition::Effects::SceneLightingEffect : IGraphicsEffect, IGraphicsEffectSource, ISceneLightingEffect, ISceneLightingEffect2
public sealed class SceneLightingEffect : IGraphicsEffect, IGraphicsEffectSource, ISceneLightingEffect, ISceneLightingEffect2
Public NotInheritable Class SceneLightingEffect Implements IGraphicsEffect, IGraphicsEffectSource, ISceneLightingEffect, ISceneLightingEffect2
Attributes
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Examples


IGraphicsEffect graphicsEffect = new CompositeEffect() 
{ 
  Mode = CanvasComposite.Add, 
  Sources = 
  { 
    new CompositionEffectSourceParameter("ImageSource"), 
    new SceneLightingEffect() 
    { 
      Name = "Material",                                     
      AmbientAmount = 0, 
      DiffuseAmount = .75f, 
      SpecularAmount = 0, 
      SpecularShine = 20 
      NormalMapSource = new CompositionEffectSourceParameter("NormalMap"), 
    } 
  } 
}; 

Constructors

SceneLightingEffect() SceneLightingEffect() SceneLightingEffect() SceneLightingEffect()

Creates an instance of SceneLightingEffect.

Properties

AmbientAmount AmbientAmount AmbientAmount AmbientAmount

The proportion of predefined AmbientLight used by the effect.

DiffuseAmount DiffuseAmount DiffuseAmount DiffuseAmount

Intensity of the diffuse light.

Name Name Name Name

Name of the light.

NormalMapSource NormalMapSource NormalMapSource NormalMapSource

The normal map for the effect.

ReflectanceModel ReflectanceModel ReflectanceModel ReflectanceModel

Gets or sets a value that indicates how the reflectance of a SceneLightingEffect is modeled.

SpecularAmount SpecularAmount SpecularAmount SpecularAmount

Intensity of the specular light.

SpecularShine SpecularShine SpecularShine SpecularShine

Specular power for the Blinn-Phong lighting model.

See Also