MCPcopy Create free account
hub / github.com/TheRealMJP/MSAAFilter / AfterReset

Method AfterReset

MSAAFilter/PostProcessor.cpp:47–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void 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
71void PostProcessor::Render(ID3D11DeviceContext* deviceContext, ID3D11ShaderResourceView* input,
72 ID3D11RenderTargetView* output, float deltaSeconds)

Callers

nothing calls this directly

Calls 2

DispatchSizeFunction · 0.85
InitializeMethod · 0.45

Tested by

no test coverage detected