BRE12
PostProcessPass.h
1 #pragma once
2 
3 #include <memory>
4 
5 #include <CommandManager\CommandListPerFrame.h>
6 #include <PostProcessPass\PostProcessCmdListRecorder.h>
7 
8 struct D3D12_CPU_DESCRIPTOR_HANDLE;
9 struct ID3D12Resource;
10 
11 namespace BRE {
12 // Pass that applies post processing effects (anti aliasing, color grading, etc)
14 public:
15  PostProcessPass() = default;
16  ~PostProcessPass() = default;
17  PostProcessPass(const PostProcessPass&) = delete;
18  const PostProcessPass& operator=(const PostProcessPass&) = delete;
19  PostProcessPass(PostProcessPass&&) = delete;
20  PostProcessPass& operator=(PostProcessPass&&) = delete;
21 
22  void Init(ID3D12Resource& inputColorBuffer) noexcept;
23 
24  // Preconditions:
25  // - Init() must be called first
26  void Execute(ID3D12Resource& renderTargetBuffer,
27  const D3D12_CPU_DESCRIPTOR_HANDLE& renderTargetView) noexcept;
28 
29 private:
30  // Method used internally for validation purposes
31  bool IsDataValid() const noexcept;
32 
33  void ExecuteBeginTask(ID3D12Resource& renderTargetBuffer,
34  const D3D12_CPU_DESCRIPTOR_HANDLE& renderTargetView) noexcept;
35 
36  CommandListPerFrame mCommandListPerFrame;
37 
38  ID3D12Resource* mInputColorBuffer{ nullptr };
39 
40  std::unique_ptr<PostProcessCmdListRecorder> mCommandListRecorder;
41 };
42 
43 }
44 
Definition: Camera.cpp:8
Definition: PostProcessPass.h:13
Definition: CommandListPerFrame.h:16