Creates all required render targets
| 135 | |
| 136 | // Creates all required render targets |
| 137 | void MSAAFilter::CreateRenderTargets() |
| 138 | { |
| 139 | ID3D11Device* device = deviceManager.Device(); |
| 140 | uint32 width = deviceManager.BackBufferWidth(); |
| 141 | uint32 height = deviceManager.BackBufferHeight(); |
| 142 | |
| 143 | const uint32 NumSamples = AppSettings::NumMSAASamples(); |
| 144 | const uint32 Quality = NumSamples > 0 ? D3D11_STANDARD_MULTISAMPLE_PATTERN : 0; |
| 145 | colorTarget.Initialize(device, width, height, DXGI_FORMAT_R16G16B16A16_FLOAT, 1, NumSamples, Quality); |
| 146 | depthBuffer.Initialize(device, width, height, DXGI_FORMAT_D32_FLOAT, true, NumSamples, Quality); |
| 147 | velocityTarget.Initialize(device, width, height, DXGI_FORMAT_R16G16_FLOAT, true, NumSamples, Quality); |
| 148 | |
| 149 | if(resolveTarget.Width != width || resolveTarget.Height != height) |
| 150 | { |
| 151 | resolveTarget.Initialize(device, width, height, colorTarget.Format); |
| 152 | velocityResolveTarget.Initialize(device, width, height, velocityTarget.Format); |
| 153 | prevFrameTarget.Initialize(device, width, height, colorTarget.Format); |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | void MSAAFilter::Update(const Timer& timer) |
| 158 | { |
nothing calls this directly
no test coverage detected