示例#1
0
        public void ReloadTextureSizeResources(ProcessingList processingList)
        {
            int x = Math.Max((int)Math.Round(deviceResources.GetOutputSize().Width), 1);
            int y = Math.Max((int)Math.Round(deviceResources.GetOutputSize().Height), 1);

            outputRTV.ReloadAsRTVUAV(x, y, outputFormat);
            processingList.UnsafeAdd(outputRTV);
            for (int i = 0; i < ScreenSizeRenderTextures.Length; i++)
            {
                ScreenSizeRenderTextures[i].ReloadAsRTVUAV(x, y, gBufferFormat);
                processingList.UnsafeAdd(ScreenSizeRenderTextures[i]);
            }
            for (int i = 0; i < ScreenSizeDSVs.Length; i++)
            {
                ScreenSizeDSVs[i].ReloadAsDepthStencil(x, y, depthFormat);
                processingList.UnsafeAdd(ScreenSizeDSVs[i]);
            }
            ReadBackTexture2D.Reload(x, y, 4);
            processingList.UnsafeAdd(ReadBackTexture2D);
            screenWidth  = x;
            screenHeight = y;
            dpi          = deviceResources.GetDpi();
            logicScale   = dpi / 96.0f;
        }