本文整理汇总了C#中ShaderProgram.Init方法的典型用法代码示例。如果您正苦于以下问题:C# ShaderProgram.Init方法的具体用法?C# ShaderProgram.Init怎么用?C# ShaderProgram.Init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShaderProgram
的用法示例。
在下文中一共展示了ShaderProgram.Init方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadShader
private ShaderProgram LoadShader()
{
var program = new ShaderProgram(this.GetType().Name);
program.Init(
@"sdf.glsl|vs",
@"sdf.glsl|fs",
new List<Variable>
{
new Variable(0, "vertex")
});
return program;
}
示例2: LoadShader
private ShaderProgram LoadShader()
{
var program = new ShaderProgram(this.GetType().Name);
// setup shader
program.Init(
@"PatchRender.glsl|MediumVertex",
@"PatchRender.glsl|MediumFragment",
new List<Variable>
{
new Variable(0, "vertex"),
new Variable(1, "in_boxcoord")
},
new string[]
{
"out_Colour",
"out_Normal",
"out_Shading",
"out_Lighting"
});
return program;
}
示例3: InitShader
private void InitShader(ShaderProgram program)
{
program.Init(
@"GBufferVisCombine.vert",
@"GBufferVisCombine.frag",
new List<Variable>
{
new Variable(0, "vertex"),
new Variable(1, "in_texcoord0")
});
}
示例4: LoadShader
private ShaderProgram LoadShader()
{
var program = new ShaderProgram(this.GetType().Name);
program.Init(
@"GlobalLighting.vert",
@"GlobalLighting_RayMarch.frag",
new List<Variable>
{
new Variable(0, "vertex"),
new Variable(1, "in_texcoord0")
});
return program;
}
示例5: LoadShaderProgram
private ShaderProgram LoadShaderProgram()
{
var program = new ShaderProgram(Name);
// setup shader
program.Init(
vsSource,
fsSource,
new List<Variable>
{
new Variable(0, "vertex"),
new Variable(1, "in_texcoord")
},
new string[] { "out_Colour" },
null
);
return program;
}
示例6: SetupGBufferCombiner
private void SetupGBufferCombiner()
{
var program = new ShaderProgram("combiner");
program.Init(
@"GBufferCombine.vert",
@"GBufferCombine.frag",
new List<Variable>
{
new Variable(0, "vertex"),
new Variable(1, "in_texcoord0")
});
this.gbufferCombiner = new GBufferCombiner(this.gbuffer, program);
}