18
18
// THE SOFTWARE.
19
19
20
20
21
- #include " dynamicbufferringdx12 .h"
22
- #include " staticbufferpooldx12 .h"
23
- #include " uploadheapdx12 .h"
24
- #include " texturedx12 .h"
25
- #include " postprocps .h"
26
- #include " texturedx12 .h"
27
- #include " bloom .h"
21
+ #include " cmp_dynamicbufferringdx12 .h"
22
+ #include " cmp_staticbufferpooldx12 .h"
23
+ #include " cmp_uploadheapdx12 .h"
24
+ #include " cmp_texturedx12 .h"
25
+ #include " cmp_postprocps .h"
26
+ #include " cmp_texturedx12 .h"
27
+ #include " cmp_bloom .h"
28
28
29
29
30
- void Bloom ::OnCreate (
30
+ void CMP_Bloom ::OnCreate (
31
31
ID3D12Device* pDevice,
32
32
UINT node,
33
33
ResourceViewHeapsDX12 *pHeaps,
@@ -75,7 +75,8 @@ void Bloom::OnCreate(
75
75
}
76
76
}
77
77
78
- void Bloom::OnCreateWindowSizeDependentResources (ID3D12Device* pDevice, DWORD Width, DWORD Height, UINT node, UINT nodemask) {
78
+ void CMP_Bloom::OnCreateWindowSizeDependentResources (ID3D12Device* pDevice, DWORD Width, DWORD Height, UINT node, UINT nodemask)
79
+ {
79
80
m_Width = Width;
80
81
m_Height = Height;
81
82
@@ -95,30 +96,34 @@ void Bloom::OnCreateWindowSizeDependentResources(ID3D12Device* pDevice, DWORD Wi
95
96
96
97
}
97
98
98
- void Bloom::OnDestroyWindowSizeDependentResources () {
99
+ void CMP_Bloom::OnDestroyWindowSizeDependentResources ()
100
+ {
99
101
for (int i = 0 ; i < BLOOM_DEPTH; i++) {
100
102
m_mip[i].OnDestroy ();
101
103
m_blurTempMip[i].OnDestroy ();
102
104
}
103
105
}
104
106
105
- void Bloom::OnDestroy () {
107
+ void CMP_Bloom::OnDestroy ()
108
+ {
106
109
m_downscale.OnDestroy ();
107
110
m_blurY.OnDestroy ();
108
111
m_blurX.OnDestroy ();
109
112
m_blendAdd.OnDestroy ();
110
113
m_blendFactor.OnDestroy ();
111
114
}
112
115
113
- void Bloom::SetViewPortAndScissor (ID3D12GraphicsCommandList* pCommandList, int i) {
116
+ void CMP_Bloom::SetViewPortAndScissor (ID3D12GraphicsCommandList* pCommandList, int i)
117
+ {
114
118
D3D12_VIEWPORT viewPort = { 0 .0f , 0 .0f , static_cast <float >(m_Width >> (i + 1 )), static_cast <float >(m_Height >> (i + 1 )), 0 .0f , 1 .0f };
115
119
D3D12_RECT rectScissor = { 0 , 0 , (LONG)(m_Width >> (i + 1 )), (LONG)(m_Height >> (i + 1 )) };
116
120
pCommandList->RSSetViewports (1 , &viewPort);
117
121
pCommandList->RSSetScissorRects (1 , &rectScissor);
118
122
119
123
}
120
124
121
- void Bloom::Draw (ID3D12GraphicsCommandList* pCommandList, TextureDX12 *pInput, float glowFactor) {
125
+ void CMP_Bloom::Draw (ID3D12GraphicsCommandList* pCommandList, TextureDX12* pInput, float glowFactor)
126
+ {
122
127
pInput->CreateRTV (0 , &m_inputRTV);
123
128
pInput->CreateSRV (0 , &m_inputSRV);
124
129
0 commit comments