本文整理汇总了C#中IScreen.LoadEffect方法的典型用法代码示例。如果您正苦于以下问题:C# IScreen.LoadEffect方法的具体用法?C# IScreen.LoadEffect怎么用?C# IScreen.LoadEffect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IScreen
的用法示例。
在下文中一共展示了IScreen.LoadEffect方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Z_Nebula
public Z_Nebula(IScreen screen)
: base(screen)
{
zNebulaEffect = screen.LoadEffect ("Z_Nebula");
RegisterEffect (zNebulaEffect);
}
示例2: OpaqueEffect
public OpaqueEffect(IScreen screen)
: base(screen)
{
pascalEffect = screen.LoadEffect ("OpaqueShader");
RegisterEffect (pascalEffect);
}
示例3: CelShadingEffect
// current edge detection threshold
/// <summary>
/// Erstellt einen neuen Cel-Shading-Effekt für den angegebenen IGameScreen.
/// </summary>
public CelShadingEffect(IScreen screen)
: base(screen)
{
/* Set our light direction for the cel-shader
*/
lightDirection = new Vector4 (0.0f, 0.0f, 1.0f, 1.0f);
/* Load and initialize the cel-shader effect
*/
celShader = screen.LoadEffect ("CelShader");
RegisterEffect (celShader);
celShader.Parameters ["LightDirection"].SetValue (lightDirection);
celMap = screen.LoadTexture ("CelMap");
if (celMap == null) {
celMap = ContentLoader.CreateTexture (screen.GraphicsDevice, Color.White);
}
celShader.Parameters ["Color"].SetValue (Color.Green.ToVector4 ());
celShader.Parameters ["CelMap"].SetValue (celMap);
/* Load and initialize the outline shader effect
*/
outlineShader = screen.LoadEffect ("OutlineShader");
RegisterEffect (outlineShader);
outlineShader.Parameters ["Thickness"].SetValue (outlineThickness);
outlineShader.Parameters ["Threshold"].SetValue (outlineThreshold);
outlineShader.Parameters ["ScreenSize"].SetValue (new Vector2 (screen.Viewport.Bounds.Width, screen.Viewport.Bounds.Height));
}