Esempio n. 1
0
 public void Destroy(IPluginIO pin, DX11RenderContext context, bool force)
 {
     if (this.generator != null)
     {
         this.generator.Dispose(); this.generator = null;
     }
 }
        private void WriteResult(TextureArraySetSlice generator, DX11RenderContext context)
        {
            DX11RenderTextureArray result = generator.Result;

            this.FOutTB[0][context] = generator.Result;

            for (int i = 0; i < this.FOutSliceTextures.SliceCount; i++)
            {
                DX11Texture2D slice = DX11Texture2D.FromTextureAndSRV(context, result.Resource, result.SliceRTV[i].SRV);
                this.FOutSliceTextures[i][context] = slice;
            }
        }
        public void Update(IPluginIO pin, DX11RenderContext context)
        {
            if (generator == null) { generator = new TextureArraySetSlice(context); }

            if (this.FTexIn.PluginIO.IsConnected)
            {
                if (this.FReset[0])
                {
                    generator.Reset(this.FTexIn[0][context], this.Width[0], this.Height[0], this.Depth[0], this.Format[0]);
                    this.FOutTB[0][context] = generator.Result;
                }
                else if (this.FWrite[0])
                {
                    generator.Apply(this.FTexIn[0][context], this.Width[0], this.Height[0], this.Depth[0], this.Format[0], this.FSliceIndex[0]);
                    this.FOutTB[0][context] = generator.Result;
                }
            }
        }
Esempio n. 4
0
        public void Update(IPluginIO pin, DX11RenderContext context)
        {
            if (generator == null)
            {
                generator = new TextureArraySetSlice(context);
            }

            if (this.FTexIn.PluginIO.IsConnected)
            {
                if (this.FReset[0])
                {
                    generator.Reset(this.FTexIn[0][context], this.Width[0], this.Height[0], this.Depth[0], this.Format[0]);
                    this.FOutTB[0][context] = generator.Result;
                }
                else if (this.FWrite[0])
                {
                    generator.Apply(this.FTexIn[0][context], this.Width[0], this.Height[0], this.Depth[0], this.Format[0], this.FSliceIndex[0]);
                    this.FOutTB[0][context] = generator.Result;
                }
            }
        }
 public void Destroy(IPluginIO pin, DX11RenderContext context, bool force)
 {
     if (this.generator != null) { this.generator.Dispose(); this.generator = null; }
 }