BRE12
HeightCommandListRecorder.h
1 #pragma once
2 
3 #include <GeometryPass/GeometryPassCommandListRecorder.h>
4 
5 namespace BRE {
6 class MaterialProperties;
7 
8 // CommandListRecorders that does texture mapping + normal mapping + height mapping
10 public:
11  HeightCommandListRecorder() = default;
12  ~HeightCommandListRecorder() = default;
14  const HeightCommandListRecorder& operator=(const HeightCommandListRecorder&) = delete;
17 
18  static void InitSharedPSOAndRootSignature(const DXGI_FORMAT* geometryBufferFormats,
19  const std::uint32_t geometryBufferCount) noexcept;
20 
21  // Preconditions:
22  // - All containers must not be empty
23  // - InitSharedPSOAndRootSignature() must be called first and once
24  void Init(const std::vector<GeometryData>& geometryDataVector,
25  const std::vector<MaterialProperties>& materialProperties,
26  const std::vector<ID3D12Resource*>& diffuseTextures,
27  const std::vector<ID3D12Resource*>& normalTextures,
28  const std::vector<ID3D12Resource*>& heightTextures) noexcept;
29 
30  // Preconditions:
31  // - Init() must be called first
32  void RecordAndPushCommandLists(const FrameCBuffer& frameCBuffer) noexcept final override;
33 
34  bool IsDataValid() const noexcept final override;
35 
36 private:
37  // Preconditions:
38  // - All containers must not be empty
39  void InitConstantBuffers(const std::vector<MaterialProperties>& materialProperties,
40  const std::vector<ID3D12Resource*>& diffuseTextures,
41  const std::vector<ID3D12Resource*>& normalTextures,
42  const std::vector<ID3D12Resource*>& heightTextures) noexcept;
43 
44  D3D12_GPU_DESCRIPTOR_HANDLE mBaseColorBufferGpuDescriptorsBegin;
45  D3D12_GPU_DESCRIPTOR_HANDLE mNormalBufferGpuDescriptorsBegin;
46  D3D12_GPU_DESCRIPTOR_HANDLE mHeightBufferGpuDescriptorsBegin;
47 };
48 }
49 
Definition: Camera.cpp:8
Definition: GeometryPassCommandListRecorder.h:20
Definition: CBuffers.h:23
Definition: HeightCommandListRecorder.h:9