Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="w"></param>
        /// <param name="h"></param>
        public void ScreenSizeChanged(int w, int h)
        {
            csMgr_.ScreenSizeChanged(w, h);
            var bufs = new IShaderView[] { gbuffers_[0], gbuffers_[1], gbuffers_[2], GraphicsCore.DefaultDepthBuffer, lightMgr_.LightBuffer, shadowMap_.Map };

            csMgr_.SetResources(bufs);

            // GBuffer
            for (int i = 0; i < gbufferDesc_.Length; i++)
            {
                gbufferDesc_[i].width  = w;
                gbufferDesc_[i].height = h;
                gbuffers_[i].Dispose();
                gbuffers_[i].Initialize(gbufferDesc_[i]);
            }
            deferredBuffer_.depth_stencil_ = GraphicsCore.DefaultDepthBuffer;
            forwardBuffer_.depth_stencil_  = GraphicsCore.DefaultDepthBuffer;
            uav_.Dispose();
            uavDesc_.width  = w;
            uavDesc_.height = h;
            uav_.Initialize(uavDesc_);
            hdrResolveBuffer_.Dispose();
            hdrResolveDesc_.width  = w;
            hdrResolveDesc_.height = h;
            hdrResolveBuffer_.Initialize(hdrResolveDesc_);
            prim_.GetMaterial().SetShaderViewPS(0, debugViewList_[ViewModel.ViewIndex]);

            // カラーバッファ作り替え
            fxaaPrim_.GetMaterial().SetShaderViewPS(0, hdrResolveBuffer_);
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="w"></param>
        /// <param name="h"></param>
        public void ScreenSizeChanged(int w, int h)
        {
            // GBuffer
            for (int i = 0; i < gbufferDesc_.Length; i++)
            {
                gbufferDesc_[i].width  = w;
                gbufferDesc_[i].height = h;
                gbuffers_[i].Dispose();
                gbuffers_[i].Initialize(gbufferDesc_[i]);
            }
            gBufferBinder_.depth_stencil_ = MyRenderer.DefaultDepthBuffer;
            hdrResolveBuffer_.Dispose();
            hdrResolveDesc_.width  = w;
            hdrResolveDesc_.height = h;
            hdrResolveBuffer_.Initialize(hdrResolveDesc_);

            // カラーバッファ作り替え
            fxaaPrim_.GetMaterial().SetShaderViewPS(0, hdrResolveBuffer_);
        }