it at least does something

This commit is contained in:
Dynamitos
2025-02-28 16:56:51 +09:00
parent f73cc61693
commit 67b4a533f2
40 changed files with 440 additions and 413 deletions
@@ -25,15 +25,9 @@ class LightCullingPass : public RenderPass {
void setupFrustums();
static constexpr uint32 BLOCK_SIZE = 32;
static constexpr uint32 INDEX_LIGHT_ENV = 1;
struct DispatchParams {
glm::uvec3 numThreadGroups;
uint32_t pad0;
glm::uvec3 numThreads;
uint32_t pad1;
} dispatchParams;
Gfx::OShaderBuffer frustumBuffer;
Gfx::OUniformBuffer dispatchParamsBuffer;
constexpr static std::string FRUSTUMBUFFER_NAME = "frustums";
Gfx::ODescriptorLayout dispatchParamsLayout;
Gfx::PDescriptorSet dispatchParamsSet;
Gfx::OComputeShader frustumShader;
@@ -42,12 +36,19 @@ class LightCullingPass : public RenderPass {
PLightEnvironment lightEnv;
Gfx::PTexture2D depthAttachment;
constexpr static std::string DEPTHATTACHMENT_NAME = "depth";
Gfx::OShaderBuffer oLightIndexCounter;
constexpr static std::string OLIGHTINDEXCOUNTER_NAME = "oLightIndexCounter";
Gfx::OShaderBuffer tLightIndexCounter;
constexpr static std::string TLIGHTINDEXCOUNTER_NAME = "tLightIndexCounter";
Gfx::OShaderBuffer oLightIndexList;
constexpr static std::string OLIGHTINDEXLIST_NAME = "oLightIndexList";
Gfx::OShaderBuffer tLightIndexList;
constexpr static std::string TLIGHTINDEXLIST_NAME = "tLightIndexList";
Gfx::OTexture2D oLightGrid;
constexpr static std::string OLIGHTGRID_NAME = "oLightGrid";
Gfx::OTexture2D tLightGrid;
constexpr static std::string TLIGHTGRID_NAME = "tLightGrid";
Gfx::PDescriptorSet cullingDescriptorSet;
Gfx::ODescriptorLayout cullingDescriptorLayout;
Gfx::OPipelineLayout cullingLayout;