public void Compile(IShaderInfo info, string text)
        {
            var bytes = Encoding.UTF8.GetBytes(text);

            bytes = compilator.Compile(bytes, info.EntryPoint, ConvertToShaderStage(info.Stage), info.Name);
            info.WriteCompiledBytes(bytes);
        }
        public void Compile(IShaderInfo info)
        {
            var bytes = info.ReadBytes();

            bytes = compilator.Compile(bytes, info.EntryPoint, ConvertToShaderStage(info.Stage), info.Name);
            info.WriteCompiledBytes(bytes);
        }
Example #3
0
 public ShaderTabEditor(IShaderInfo info, IRenderTechniquePass pass)
 {
     this.Info   = info;
     this.pass   = pass;
     Lines       = new ObservableCollection <int>();
     environment = new ShaderDevelopmentEnvironment();
 }
        public void CompileWithPreprocessing(IShaderInfo info, string text)
        {
            info.ReadText();
            var preprocessed = compilator.Preprocess(text, include ?? new D3DIncludeAdapter(new Dictionary <string, IIncludeResourse>()));
            var bytes        = Encoding.UTF8.GetBytes(preprocessed);

            bytes = compilator.Compile(bytes, info.EntryPoint, ConvertToShaderStage(info.Stage), info.Name);
            info.WriteCompiledBytes(bytes);
        }
 public ShaderTabEditor(IShaderInfo info, IRenderTechniquePass pass)
 {
     this.Info = info;
     this.pass = pass;
 }
        public void CompileWithPreprocessing(IShaderInfo info)
        {
            var text = info.ReadText();

            CompileWithPreprocessing(info, text);
        }