| 45 | } |
| 46 | |
| 47 | void PostProcessor::AfterReset(uint32 width, uint32 height) |
| 48 | { |
| 49 | PostProcessorBase::AfterReset(width, height); |
| 50 | |
| 51 | reductionTargets.clear(); |
| 52 | |
| 53 | uint32 w = width; |
| 54 | uint32 h = height; |
| 55 | |
| 56 | while(w > 1 || h > 1) |
| 57 | { |
| 58 | w = DispatchSize(ReductionTGSize, w); |
| 59 | h = DispatchSize(ReductionTGSize, h); |
| 60 | |
| 61 | RenderTarget2D rt; |
| 62 | rt.Initialize(device, w, h, DXGI_FORMAT_R32_FLOAT, 1, 1, 0, false, true); |
| 63 | reductionTargets.push_back(rt); |
| 64 | } |
| 65 | |
| 66 | adaptedLuminance = reductionTargets[reductionTargets.size() - 1].SRView; |
| 67 | |
| 68 | constantBuffer.Data.EnableAdaptation = false; |
| 69 | } |
| 70 | |
| 71 | void PostProcessor::Render(ID3D11DeviceContext* deviceContext, ID3D11ShaderResourceView* input, |
| 72 | ID3D11RenderTargetView* output, float deltaSeconds) |
nothing calls this directly
no test coverage detected