本文整理汇总了C#中Texture.SetShaderParam方法的典型用法代码示例。如果您正苦于以下问题:C# Texture.SetShaderParam方法的具体用法?C# Texture.SetShaderParam怎么用?C# Texture.SetShaderParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Texture
的用法示例。
在下文中一共展示了Texture.SetShaderParam方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
public static void Main()
{
ClutterRun.Init ();
Stage stage = Stage.Default;
stage.SetSize(512, 384);
Shader shader = new Shader ();
shader.FragmentSource = shader_sources[current_shader];
shader.Compile ();
stage.Title = "Shader Test";
stage.Color = new Clutter.Color (0x61, 0x64, 0x8c, 0xff);
Timeline timeline = new Timeline(360, 60);
timeline.Loop = true;
stage.AddActor (new Label ("Mono 16", "Press the Hand"));
Texture actor = new Texture("redhand.png");
actor.SetShader (shader);
actor.Reactive = true;
actor.ButtonPressEvent += HandleActorButtonPress;
stage.AddActor (actor);
actor.SetShaderParam("brightness", 0.4f);
actor.SetShaderParam("contrast", -1.9f);
actor.SetPosition (0, 20);
stage.ShowAll ();
timeline.Start ();
ClutterRun.Main ();
}