Esempio n. 1
0
        static void TestPixelShader(string name)
        {
            var bytecode = GenericPixelShaderGenerator.GeneratePixelShader(name, ShaderStage.Default.ToString());
            var str      = D3DCompiler.Disassemble(bytecode.Bytecode);

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

            Console.WriteLine(str);
        }
Esempio n. 2
0
        public override string GenerateChudPixelShader(ChudShader chudShader, ShaderStage entry)
        {
            var bytecode = GenericPixelShaderGenerator.GeneratePixelShader(chudShader.ToString(), entry.ToString().ToLower(), true).Bytecode;

            return(D3DCompiler.Disassemble(bytecode));
        }
Esempio n. 3
0
        public override string GenerateExplicitPixelShader(ExplicitShader explicitShader, ShaderStage entry)
        {
            var bytecode = GenericPixelShaderGenerator.GeneratePixelShader(explicitShader.ToString(), entry.ToString().ToLower(), false).Bytecode;

            return(D3DCompiler.Disassemble(bytecode));
        }