예제 #1
0
 public GLSLPassTemplate(TranslatedMaterialGraph graph)
 {
     Graph = graph;
     VertexShaderGenerator            = new GLSLCodeGen(this);
     VertexShaderUniformsAndFunctions = new UniformsAndFunctions(
         graph.Script.Nodes.Where(_ => _.Extra != null && !_.Extra.RequiredInPixelShader),
         graph.VertexShaderUniforms, VertexShaderGenerator);
     PixelShaderGenerator            = new GLSLCodeGen(this);
     PixelShaderUniformsAndFunctions = new UniformsAndFunctions(
         graph.Script.Nodes.Where(_ => _.Extra != null && _.Extra.RequiredInPixelShader),
         graph.PixelShaderUniforms, PixelShaderGenerator);
 }
예제 #2
0
 public GLSLPassTemplate(TranslatedMaterialGraph graph)
 {
     Graph = graph;
     VertexShaderGenerator            = new GLSLCodeGen(this);
     VertexShaderUniformsAndFunctions = new UniformsAndFunctions(
         graph.Script.Nodes.Where(_ =>
                                  _.Extra?.Attribution == TranslatedMaterialGraph.NodeAttribution.VertexShader),
         graph.VertexShaderUniforms, VertexShaderGenerator);
     PixelShaderGenerator            = new GLSLCodeGen(this);
     PixelShaderUniformsAndFunctions = new UniformsAndFunctions(
         graph.Script.Nodes.Where(_ =>
                                  _.Extra?.Attribution == TranslatedMaterialGraph.NodeAttribution.PixelShader),
         graph.PixelShaderUniforms, PixelShaderGenerator);
 }