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; }
public void ChangeShadowMapsQuality(ProcessingList processingList, bool highQuality) { if (HighResolutionShadowNow == highQuality) { return; } HighResolutionShadowNow = highQuality; void _Quality(int x, int y) { ShadowMapCube.ReloadAsDSV(x, y, depthFormat); processingList.UnsafeAdd(ShadowMapCube); } if (highQuality) { _Quality(c_shadowMapResolutionHigh, c_shadowMapResolutionHigh); } else { _Quality(c_shadowMapResolutionLow, c_shadowMapResolutionLow); } }