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); }
public ShaderTypeGenerator(Type type, GenerateHLSL attr) { this.type = type; this.attr = attr; debugCounter = 0; }
public static bool GenerateHLSL(System.Type type, GenerateHLSL attribute, out string shaderSource) { List <string> errors; return(GenerateHLSL(type, attribute, out shaderSource, out errors)); }