MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / Bloom

Method Bloom

BindlessDeferred/PostProcessor.cpp:59–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59TempRenderTarget* PostProcessor::Bloom(ID3D12GraphicsCommandList* cmdList, const RenderTexture& input)
60{
61 PIXMarker marker(cmdList, "Bloom");
62
63 const uint64 bloomWidth = input.Texture.Width / 2;
64 const uint64 bloomHeight = input.Texture.Height / 2;
65
66 TempRenderTarget* downscale1 = helper.GetTempRenderTarget(bloomWidth, bloomHeight, DXGI_FORMAT_R16G16B16A16_FLOAT);
67 downscale1->RT.MakeWritable(cmdList);
68
69 helper.PostProcess(bloom, "Bloom Initial Pass", input, downscale1);
70
71 TempRenderTarget* blurTemp = helper.GetTempRenderTarget(bloomWidth, bloomHeight, DXGI_FORMAT_R16G16B16A16_FLOAT);
72 downscale1->RT.MakeReadable(cmdList);
73
74 // Blur it
75 for(uint64 i = 0; i < 2; ++i)
76 {
77 blurTemp->RT.MakeWritable(cmdList);
78
79 helper.PostProcess(blurH, "Horizontal Bloom Blur", downscale1, blurTemp);
80
81 blurTemp->RT.MakeReadable(cmdList);
82 downscale1->RT.MakeWritable(cmdList);
83
84 helper.PostProcess(blurV, "Vertical Bloom Blur", blurTemp, downscale1);
85
86 downscale1->RT.MakeReadable(cmdList);
87 }
88
89 blurTemp->InUse = false;
90
91 return downscale1;
92}

Callers

nothing calls this directly

Calls 4

GetTempRenderTargetMethod · 0.80
MakeWritableMethod · 0.80
PostProcessMethod · 0.80
MakeReadableMethod · 0.80

Tested by

no test coverage detected