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

Method AfterReset

BakingLab/PostProcessor.cpp:75–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void 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
99void PostProcessor::Render(ID3D11DeviceContext* deviceContext, ID3D11ShaderResourceView* input,
100 ID3D11ShaderResourceView* depthBuffer, const Camera& camera,

Callers

nothing calls this directly

Calls 5

DispatchSizeFunction · 0.85
clearMethod · 0.45
InitializeMethod · 0.45
push_backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected