Example #1
0
        public ShaderInfo(FileChunk fileChunk)
        {
            bytecode = new ShaderBytecode(fileChunk.CompiledShader);
            this.Name = fileChunk.Name;
            this.ConstantHandles = new List<EffectHandle>();
            this.ConstantDescriptions = new List<ConstantDescription>();

            int i = 0;
            ConstantTable cTable = bytecode.ConstantTable;
            if (cTable != null)
            {
                EffectHandle handle = bytecode.ConstantTable.GetConstant(null, 0);
                while (handle != null)
                {
                    ConstantHandles.Add(handle);
                    var desc = bytecode.ConstantTable.GetConstantDescription(handle);
                    ConstantDescriptions.Add(desc);
                    i++;
                    handle = bytecode.ConstantTable.GetConstant(null, i);
                }
            }
        }
Example #2
0
 public VertexShaderInfo(FileChunk fileChunk)
     : base(fileChunk)
 {
     this.IsVertexShader = true;
     this.Shader = new VertexShader(GlobalRenderSettings.Instance.Device, bytecode);
 }
Example #3
0
 public PixelShaderInfo(FileChunk fileChunk)
     : base(fileChunk)
 {
     this.Shader = new PixelShader(GlobalRenderSettings.Instance.Device, bytecode);
 }