Esempio n. 1
0
        private Blob ConstructBytecode(ShaderInitParams.ShaderFileEntryPoint ShaderFileData)
        {
            string ShaderFileName = ShaderPath + ShaderFileData.FilePath;

            Blob OurBytecode  = null;
            Blob OurErrorcode = null;

            Compiler.CompileFromFile(ShaderFileName, ShaderFileData.EntryPoint, ShaderFileData.Target, out OurBytecode, out OurErrorcode);
            if (OurErrorcode != null)
            {
                string Error = OurErrorcode.ConvertToString();
            }

            return(OurBytecode);
        }
Esempio n. 2
0
        private ShaderBytecode ConstructBytecode(ShaderInitParams.ShaderFileEntryPoint ShaderFileData)
        {
            string ShaderFileName = ShaderPath + ShaderFileData.FilePath;

            return(ShaderBytecode.CompileFromFile(ShaderFileName, ShaderFileData.EntryPoint, ShaderFileData.Target, ShaderFlags.None, EffectFlags.None));
        }