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.

Equivalent WinUI class: Microsoft.UI.Composition.Effects.SceneLightingEffect.

public ref class SceneLightingEffect sealed : IGraphicsEffect
/// [Windows.Foundation.Metadata.Activatable(196608, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.WebHostHidden]
class SceneLightingEffect final : IGraphicsEffect
/// [Windows.Foundation.Metadata.Activatable(196608, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.WebHostHidden]
/// [Windows.Foundation.Metadata.DualApiPartition(version=167772164)]
class SceneLightingEffect final : IGraphicsEffect
[Windows.Foundation.Metadata.Activatable(196608, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.WebHostHidden]
public sealed class SceneLightingEffect : IGraphicsEffect
[Windows.Foundation.Metadata.Activatable(196608, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.WebHostHidden]
[Windows.Foundation.Metadata.DualApiPartition(version=167772164)]
public sealed class SceneLightingEffect : IGraphicsEffect
Public NotInheritable Class SceneLightingEffect
Implements IGraphicsEffect
Inheritance
SceneLightingEffect
Attributes
Implements

Windows 10 requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)

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"), 
    } 
  } 
}; 

Remarks

Version history

Windows version SDK version Value added
1709 16299 ReflectanceModel

Constructors

SceneLightingEffect()

Creates an instance of SceneLightingEffect.

Equivalent WinUI constructor: Microsoft.UI.Composition.Effects.SceneLightingEffect.SceneLightingEffect.

Properties

AmbientAmount

The proportion of predefined AmbientLight used by the effect.

Equivalent WinUI property: Microsoft.UI.Composition.Effects.SceneLightingEffect.AmbientAmount.

DiffuseAmount

Intensity of the diffuse light.

Equivalent WinUI property: Microsoft.UI.Composition.Effects.SceneLightingEffect.DiffuseAmount.

Name

Name of the light.

Equivalent WinUI property: Microsoft.UI.Composition.Effects.SceneLightingEffect.Name.

NormalMapSource

The normal map for the effect.

Equivalent WinUI property: Microsoft.UI.Composition.Effects.SceneLightingEffect.NormalMapSource.

ReflectanceModel

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

Equivalent WinUI property: Microsoft.UI.Composition.Effects.SceneLightingEffect.ReflectanceModel.

SpecularAmount

Intensity of the specular light.

Equivalent WinUI property: Microsoft.UI.Composition.Effects.SceneLightingEffect.SpecularAmount.

SpecularShine

Specular power for the Blinn-Phong lighting model.

Equivalent WinUI property: Microsoft.UI.Composition.Effects.SceneLightingEffect.SpecularShine.

Applies to

See also