forked from Dynamitos/Seele
Fixing depth mip generation
This commit is contained in:
1 parent
0fd331b3b5
commit
7cdbb19331
5 files changed
+221
-43
No files matched your search
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include "MinimalEngine.h"
|
||||
#include "RenderPass.h"
|
||||
#include "Graphics/Pipeline.h"
|
||||
#include "Graphics/Query.h"
|
||||
|
||||
namespace Seele {
|
||||
@@ -17,13 +18,28 @@ class DepthCullingPass : public RenderPass {
|
||||
virtual void createRenderPass() override;
|
||||
|
||||
private:
|
||||
Gfx::OTexture2D depthMipTexture;
|
||||
constexpr static uint64 BLOCK_SIZE = 32;
|
||||
struct MipParam {
|
||||
uint32 srcMipOffset;
|
||||
uint32 dstMipOffset;
|
||||
UVector2 srcMipDim;
|
||||
UVector2 dstMipDim;
|
||||
};
|
||||
Array<uint32> mipOffsets;
|
||||
Array<UVector2> mipDims;
|
||||
Gfx::OShaderBuffer depthMipBuffer;
|
||||
Gfx::RenderTargetAttachment depthAttachment;
|
||||
Gfx::RenderTargetAttachment visibilityAttachment;
|
||||
Gfx::ODescriptorLayout depthTextureLayout;
|
||||
Gfx::OPipelineLayout depthPrepassLayout;
|
||||
Gfx::ODescriptorLayout depthAttachmentLayout;
|
||||
Gfx::OPipelineLayout depthCullingLayout;
|
||||
Gfx::OPipelineStatisticsQuery query;
|
||||
|
||||
Gfx::OPipelineLayout depthComputeLayout;
|
||||
Gfx::OComputeShader depthInitialReduceShader;
|
||||
Gfx::PComputePipeline depthInitialReduce;
|
||||
Gfx::OComputeShader depthMipGenShader;
|
||||
Gfx::PComputePipeline depthMipGen;
|
||||
|
||||
Gfx::PShaderBuffer cullingBuffer;
|
||||
};
|
||||
DEFINE_REF(DepthCullingPass)
|
||||
|
||||
Reference in new issue
Block a user