SceneLightingEffect 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
控制 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
- 繼承
- 屬性
- 實作
範例
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光源模型的反射電源。 |