protected override void OnUpdate(DX11RenderContext context)
        {
            if (this.resetbuffers || !this.FOutTexture[0].Contains(context))
            {
                this.DisposeBuffers(context);

                DX11CubeRenderTarget rt = new DX11CubeRenderTarget(context, this.size, new SampleDescription(1, 0),
                    DeviceFormatHelper.GetFormat(this.FInFormat[0].Name), this.genmipmap, this.mipmaplevel);

                this.FOutTexture[0][context] = rt;
            }
        }
示例#2
0
        public void Update(IPluginIO pin, DX11RenderContext context)
        {
            Device device = context.Device;

            if (this.spmax == 0) { return; }

            if (this.updateddevices.Contains(context)) { return; }

            if (!this.FOutCubeTexture[0].Contains(context))
            {
                var cube = new DX11CubeRenderTarget(context, this.FInSize[0], this.sd, DeviceFormatHelper.GetFormat(this.FInFormat[0].Name), false, 1);
                this.FOutCubeTexture[0][context] = cube;
                this.FOutCubeDepthTexture[0][context] = new DX11CubeDepthStencil(context, this.FInSize[0], this.sd, Format.D24_UNorm_S8_UInt);
                for (int i = 0; i < 6; i++)
                {
                    this.FOutSliceTextures[i][context] = DX11Texture2D.FromTextureAndSRV(context, cube.Resource, cube.SliceRTV[i].SRV);
                }
            }

            this.updateddevices.Add(context);
        }