Delen via


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 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)]
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)]
public sealed class SceneLightingEffect : IGraphicsEffect
Public NotInheritable Class SceneLightingEffect
Implements IGraphicsEffect
Inheritance
Object Platform::Object IInspectable SceneLightingEffect
Attributes
Implements

Windows 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.

Properties

AmbientAmount

The proportion of predefined AmbientLight used by the effect.

DiffuseAmount

Intensity of the diffuse light.

Name

Name of the light.

NormalMapSource

The normal map for the effect.

ReflectanceModel

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

SpecularAmount

Intensity of the specular light.

SpecularShine

Specular power for the Blinn-Phong lighting model.

Applies to

See also