Trying to add fluid simulation
This commit is contained in:
1 parent
056589a6f9
commit
ac317a3829
65 files changed
+2708
-371
No files matched your search
@@ -37,6 +37,24 @@ DepthCullingPass::DepthCullingPass(Gfx::PGraphics graphics, PScene scene) : Rend
|
||||
.size = sizeof(MipParam),
|
||||
.name = "pMipParam"
|
||||
});
|
||||
graphics->beginShaderCompilation(ShaderCompilationInfo{
|
||||
.name = "DepthMipCompute",
|
||||
.modules = {"DepthMipGen"},
|
||||
.entryPoints = {{"sourceCopy", "DepthMipGen"}, {"reduceLevel", "DepthMipGen"}},
|
||||
.rootSignature = depthComputeLayout,
|
||||
});
|
||||
depthSourceCopyShader = graphics->createComputeShader({0});
|
||||
depthComputeLayout->create();
|
||||
|
||||
Gfx::ComputePipelineCreateInfo pipelineCreateInfo = {
|
||||
.computeShader = depthSourceCopyShader,
|
||||
.pipelineLayout = depthComputeLayout,
|
||||
};
|
||||
depthSourceCopy = graphics->createComputePipeline(pipelineCreateInfo);
|
||||
|
||||
depthReduceLevelShader = graphics->createComputeShader({1});
|
||||
pipelineCreateInfo.computeShader = depthReduceLevelShader;
|
||||
depthReduceLevel = graphics->createComputePipeline(pipelineCreateInfo);
|
||||
|
||||
if (graphics->supportMeshShading()) {
|
||||
graphics->getShaderCompiler()->registerRenderPass("DepthPass", Gfx::PassConfig{
|
||||
@@ -255,24 +273,6 @@ void DepthCullingPass::publishOutputs() {
|
||||
.name = "DepthMipBuffer",
|
||||
});
|
||||
|
||||
graphics->beginShaderCompilation(ShaderCompilationInfo{
|
||||
.name = "DepthMipCompute",
|
||||
.modules = {"DepthMipGen"},
|
||||
.entryPoints = {{"sourceCopy", "DepthMipGen"}, {"reduceLevel", "DepthMipGen"}},
|
||||
.rootSignature = depthComputeLayout,
|
||||
});
|
||||
depthSourceCopyShader = graphics->createComputeShader({0});
|
||||
depthComputeLayout->create();
|
||||
|
||||
Gfx::ComputePipelineCreateInfo pipelineCreateInfo = {
|
||||
.computeShader = depthSourceCopyShader,
|
||||
.pipelineLayout = depthComputeLayout,
|
||||
};
|
||||
depthSourceCopy = graphics->createComputePipeline(pipelineCreateInfo);
|
||||
|
||||
depthReduceLevelShader = graphics->createComputeShader({1});
|
||||
pipelineCreateInfo.computeShader = depthReduceLevelShader;
|
||||
depthReduceLevel = graphics->createComputePipeline(pipelineCreateInfo);
|
||||
|
||||
query = graphics->createPipelineStatisticsQuery("DepthPipelineStatistics");
|
||||
resources->registerQueryOutput("DEPTH_QUERY", query);
|
||||
|
||||
Reference in new issue
Block a user