Exemple #1
0
        public static bool GenerateHLSL(System.Type type, GenerateHLSL attribute, out string shaderSource, out List <string> errors)
        {
            ShaderTypeGenerator gen = new ShaderTypeGenerator(type, attribute);
            bool success            = gen.Generate();

            if (success)
            {
                shaderSource = gen.Emit();
            }
            else
            {
                shaderSource = null;
            }

            errors = gen.errors;
            return(success);
        }
Exemple #2
0
 public ShaderTypeGenerator(Type type, GenerateHLSL attr)
 {
     this.type    = type;
     this.attr    = attr;
     debugCounter = 0;
 }
Exemple #3
0
        public static bool GenerateHLSL(System.Type type, GenerateHLSL attribute, out string shaderSource)
        {
            List <string> errors;

            return(GenerateHLSL(type, attribute, out shaderSource, out errors));
        }