| 73 | } |
| 74 | |
| 75 | void PostProcessor::AfterReset(uint32 width, uint32 height) |
| 76 | { |
| 77 | PostProcessorBase::AfterReset(width, height); |
| 78 | |
| 79 | reductionTargets.clear(); |
| 80 | |
| 81 | uint32 w = width; |
| 82 | uint32 h = height; |
| 83 | |
| 84 | while(w > 1 || h > 1) |
| 85 | { |
| 86 | w = DispatchSize(ReductionTGSize, w); |
| 87 | h = DispatchSize(ReductionTGSize, h); |
| 88 | |
| 89 | RenderTarget2D rt; |
| 90 | rt.Initialize(device, w, h, DXGI_FORMAT_R32_FLOAT, 1, 1, 0, false, true); |
| 91 | reductionTargets.push_back(rt); |
| 92 | } |
| 93 | |
| 94 | adaptedLuminance = reductionTargets[reductionTargets.size() - 1].SRView; |
| 95 | |
| 96 | constantBuffer.Data.EnableAdaptation = false; |
| 97 | } |
| 98 | |
| 99 | void PostProcessor::Render(ID3D11DeviceContext* deviceContext, ID3D11ShaderResourceView* input, |
| 100 | ID3D11ShaderResourceView* depthBuffer, const Camera& camera, |
nothing calls this directly
no test coverage detected