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); }
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); }