Ejemplo n.º 1
0
 public ShaderGenerator(
     Compilation compilation,
     LanguageBackend language,
     params IShaderSetProcessor[] processors)
     : this(compilation, new[] { language }, null, null, null, processors)
 {
 }
Ejemplo n.º 2
0
        public IReadOnlyList <GeneratedShaderSet> GetOutput(LanguageBackend backend)
        {
            if (!_generatedShaders.TryGetValue(backend, out List <GeneratedShaderSet> list))
            {
                throw new InvalidOperationException($"The backend {backend} was not used to generate shaders for this object.");
            }

            return(list);
        }
Ejemplo n.º 3
0
        internal void AddShaderSet(LanguageBackend backend, GeneratedShaderSet gss)
        {
            if (!_generatedShaders.TryGetValue(backend, out List <GeneratedShaderSet> list))
            {
                list = new List <GeneratedShaderSet>();
                _generatedShaders.Add(backend, list);
            }

            list.Add(gss);
        }
Ejemplo n.º 4
0
 public ShaderGenerator(
     Compilation compilation,
     LanguageBackend language,
     string vertexFunctionName   = null,
     string fragmentFunctionName = null,
     string computeFunctionName  = null,
     params IShaderSetProcessor[] processors)
     : this(compilation, new[] { language }, vertexFunctionName, fragmentFunctionName, computeFunctionName, processors)
 {
 }
Ejemplo n.º 5
0
 public ShaderMethodVisitor(
     Compilation compilation,
     string setName,
     ShaderFunction shaderFunction,
     LanguageBackend backend)
 {
     _compilation    = compilation;
     _setName        = setName;
     _shaderFunction = shaderFunction;
     _backend        = backend;
 }
 public HlslMethodVisitor(Compilation compilation, string setName, ShaderFunction shaderFunction, LanguageBackend backend)
     : base(compilation, setName, shaderFunction, backend)
 {
 }