示例#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);
        }
示例#2
0
 public ShaderTypeGenerator(Type type, GenerateHLSL attr)
 {
     this.type    = type;
     this.attr    = attr;
     debugCounter = 0;
 }
示例#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));
        }