SceneLightingEffect 类

定义

控制 SpriteVisual 的反射属性。 SceneLightingEffect 将覆盖 CompositionLight 默认值。 它用于控制 SpriteVisual 的反射属性。 NormalMap 可用作输入源,但不是必需的。

public ref class SceneLightingEffect sealed : IGraphicsEffect
/// [Windows.Foundation.Metadata.Activatable(65536, "Microsoft.Foundation.LiftedContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.LiftedContract, 65536)]
/// [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.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Microsoft.Foundation.WindowsAppSDKContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.WindowsAppSDKContract, 65536)]
class SceneLightingEffect final : IGraphicsEffect
[Windows.Foundation.Metadata.Activatable(65536, "Microsoft.Foundation.LiftedContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.LiftedContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class SceneLightingEffect : IGraphicsEffect
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Microsoft.Foundation.WindowsAppSDKContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.WindowsAppSDKContract), 65536)]
public sealed class SceneLightingEffect : IGraphicsEffect
function SceneLightingEffect()
Public NotInheritable Class SceneLightingEffect
Implements IGraphicsEffect
继承
Object Platform::Object IInspectable SceneLightingEffect
属性
实现

示例

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

构造函数

SceneLightingEffect()

创建 SceneLightingEffect 的实例。

属性

AmbientAmount

效果使用的预定义 AmbientLight 的比例。

DiffuseAmount

漫射光的强度。

Name

灯的名称。

NormalMapSource

效果的法线映射。

ReflectanceModel

获取或设置一个值,该值指示如何建模 SceneLightingEffect 的反射率。

SpecularAmount

反射光的强度。

SpecularShine

Blinn-Phong照明模型的反射功率。

适用于

另请参阅