BRE12
ToneMappingPass.h
1 #pragma once
2 
3 #include <memory>
4 
5 #include <CommandManager\CommandListPerFrame.h>
6 #include <ToneMappingPass\ToneMappingCmdListRecorder.h>
7 
8 struct D3D12_CPU_DESCRIPTOR_HANDLE;
9 struct ID3D12Resource;
10 
11 namespace BRE {
13 public:
14  ToneMappingPass() = default;
15  ~ToneMappingPass() = default;
16  ToneMappingPass(const ToneMappingPass&) = delete;
17  const ToneMappingPass& operator=(const ToneMappingPass&) = delete;
18  ToneMappingPass(ToneMappingPass&&) = delete;
19  ToneMappingPass& operator=(ToneMappingPass&&) = delete;
20 
21  void Init(ID3D12Resource& inputColorBuffer,
22  ID3D12Resource& outputColorBuffer,
23  const D3D12_CPU_DESCRIPTOR_HANDLE& renderTargetView) noexcept;
24 
25  // Preconditions:
26  // - Init() must be called before
27  void Execute() noexcept;
28 
29 private:
30  bool IsDataValid() const noexcept;
31 
32  void ExecuteBeginTask() noexcept;
33 
34  CommandListPerFrame mCommandListPerFrame;
35 
36  ID3D12Resource* mInputColorBuffer{ nullptr };
37  ID3D12Resource* mOutputColorBuffer{ nullptr };
38 
39  std::unique_ptr<ToneMappingCmdListRecorder> mCommandListRecorder;
40 };
41 
42 }
43 
Definition: Camera.cpp:8
Definition: ToneMappingPass.h:12
Definition: CommandListPerFrame.h:16