Пример #1
0
        static void TestVertexShader(string name)
        {
            var bytecode = GenericVertexShaderGenerator.GenerateVertexShader(name, ShaderStage.Default.ToString()).Bytecode;
            var str      = D3DCompiler.Disassemble(bytecode);

            using (FileStream test = new FileInfo($"generated_{name}.vtsh").Create())
                using (StreamWriter writer = new StreamWriter(test))
                {
                    writer.WriteLine(str);
                }

            Console.WriteLine(str);
        }
Пример #2
0
        public override string GenerateChudVertexShader(ChudShader chudShader, ShaderStage entry)
        {
            var bytecode = GenericVertexShaderGenerator.GenerateVertexShader(chudShader.ToString(), entry.ToString().ToLower(), true).Bytecode;

            return(D3DCompiler.Disassemble(bytecode));
        }
Пример #3
0
        public override string GenerateExplicitVertexShader(ExplicitShader explicitShader, ShaderStage entry)
        {
            var bytecode = GenericVertexShaderGenerator.GenerateVertexShader(explicitShader.ToString(), entry.ToString().ToLower(), false).Bytecode;

            return(D3DCompiler.Disassemble(bytecode));
        }