public ShaderGenerationResult GenerateShaders() { if (_shaderSets.Count == 0) { throw new ShaderGenerationException("No shader sets were discovered."); } ShaderGenerationResult result = new ShaderGenerationResult(); foreach (ShaderSetInfo ss in _shaderSets) { GenerateShaders(ss, result); } // Activate processors foreach (IShaderSetProcessor processor in _processors) { // Kind of a hack, but the relevant info should be the same. foreach (GeneratedShaderSet gss in result.GetOutput(_languages[0])) { ShaderSetProcessorInput input = new ShaderSetProcessorInput( gss.Name, gss.VertexFunction, gss.FragmentFunction, gss.Model); processor.ProcessShaderSet(input); } } return(result); }
public ShaderGenerationResult GenerateShaders() { ShaderGenerationResult result = new ShaderGenerationResult(); foreach (ShaderSetInfo ss in _shaderSets) { GenerateShaders(ss, result); } // Activate processors foreach (IShaderSetProcessor processor in _processors) { // Kind of a hack, but the relevant info should be the same. foreach (GeneratedShaderSet gss in result.GetOutput(_languages.First())) { ShaderSetProcessorInput input = new ShaderSetProcessorInput( gss.Name, gss.VertexFunction, gss.FragmentFunction, gss.Model); processor.ProcessShaderSet(input); } } return(result); }