/// <summary> /// Disassembles a shader HLSL bytecode to asm code. /// </summary> /// <param name="shader">The shader.</param> /// <returns>A string containing asm code decoded from HLSL bytecode.</returns> public string DisassembleShader(EffectData.Shader shader) { var compiler = new EffectCompilerInternal(); return(compiler.DisassembleShader(shader)); }
/// <summary> /// Compiles an effect from the specified source code and file path. /// </summary> /// <param name="sourceCode">The source code.</param> /// <param name="filePath">The file path.</param> /// <param name="flags">The flags.</param> /// <param name="macrosArgs">The macrosArgs.</param> /// <param name="includeDirectoryList">The include directory list.</param> /// <param name="allowDynamicCompiling">Whether or not to allow dynamic compilation.</param> /// <param name="dependencyFilePath">Path to dependency files.</param> /// <returns>The result of compilation.</returns> public EffectCompilerResult Compile(string sourceCode, string filePath, EffectCompilerFlags flags = EffectCompilerFlags.None, List <EffectData.ShaderMacro> macrosArgs = null, List <string> includeDirectoryList = null, bool allowDynamicCompiling = false, string dependencyFilePath = null) { var compiler = new EffectCompilerInternal(); return(compiler.Compile(sourceCode, filePath, flags, macrosArgs, includeDirectoryList, allowDynamicCompiling, dependencyFilePath)); }
/// <summary> /// Disassembles a shader HLSL bytecode to asm code. /// </summary> /// <param name="shader">The shader.</param> /// <returns>A string containing asm code decoded from HLSL bytecode.</returns> public string DisassembleShader(EffectData.Shader shader) { var compiler = new EffectCompilerInternal(); return compiler.DisassembleShader(shader); }
/// <summary> /// Compiles an effect from the specified source code and file path. /// </summary> /// <param name="sourceCode">The source code.</param> /// <param name="filePath">The file path.</param> /// <param name="flags">The flags.</param> /// <param name="macrosArgs">The macrosArgs.</param> /// <param name="includeDirectoryList">The include directory list.</param> /// <param name="allowDynamicCompiling">Whether or not to allow dynamic compilation.</param> /// <param name="dependencyFilePath">Path to dependency files.</param> /// <returns>The result of compilation.</returns> public EffectCompilerResult Compile(string sourceCode, string filePath, EffectCompilerFlags flags = EffectCompilerFlags.None, List<EffectData.ShaderMacro> macrosArgs = null, List<string> includeDirectoryList = null, bool allowDynamicCompiling = false, string dependencyFilePath = null) { var compiler = new EffectCompilerInternal(); return compiler.Compile(sourceCode, filePath, flags, macrosArgs, includeDirectoryList, allowDynamicCompiling, dependencyFilePath); }
/// <summary> /// Builds effect data from the provided bytecode. /// </summary> /// <param name="shaderSource">The bytecode list to for the provided effect.</param> /// <returns>Built effect data.</returns> public EffectData Compile(params ShaderBytecode[] shaderSource) { var compiler = new EffectCompilerInternal(); return compiler.Build(shaderSource); }
/// <summary> /// Builds effect data from the provided bytecode. /// </summary> /// <param name="shaderSource">The bytecode list to for the provided effect.</param> /// <returns>Built effect data.</returns> public EffectData Compile(params ShaderBytecode[] shaderSource) { var compiler = new EffectCompilerInternal(); return(compiler.Build(shaderSource)); }